I am trying to access Google Cloud Natural Language for text analytics. The code is working fine from open internet, but not working from my company network. I am new to this Google API. I have no idea of how to configure my company proxy in the code for calling API.
Below is the code I am using to call the API.
string jsonPath = "sentimentAnalysis.json";
LanguageServiceClientBuilder builder = new LanguageServiceClientBuilder
{
CredentialsPath = jsonPath
};
LanguageServiceClient client = builder.Build();
var response = client.AnalyzeSentiment(Document.FromPlainText("Hello World."));
var sentiment = response.DocumentSentiment;
var Sentences = response.Sentences;
I have gone through below links to set proxy, but not got required information.
The Json file contain Google Language API Configuration.
{
"type": "",
"project_id": "",
"private_key_id": "",
"private_key": "",
"client_email": "",
"client_id": "",
"auth_uri": "",
"token_uri": "",
"auth_provider_x509_cert_url": "",
"client_x509_cert_url": ""
}
Can any one please provide a way how to configure proxy in the above code.