In my WCF provider, I must make a call to an API, in which I wanted to do a fireplace and neglect implementation. And if possible just seize the errors if any. (that is nice too, if not a choice)
I'm making plans to do the following implementation, what are the issues it can result in? Via doing the subsequent implementation goes to go away a huge quantity of open connections. Or what might be the difficulty? Please help in information how in a higher manner this may be implemented.
void SendRequest(inputs)
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(URL);
request.Method = "POST";
request.ContentType = "application/xml";
byte[] requestBytes = Encoding.UTF8.GetBytes(inputXML);
using (Stream requestStream = request.GetRequestStream())
{
requestStream.Write(requestBytes, 0, requestBytes.Length);
}
request.GetResponseAsync();
}
Main()
{
try
SendRequest(inputs);
catch ex
log ex;
}
0 Replies