Techiio-author
Started by Bradley ReidNov 6, 2021

Open
C # Http Web Request , Fire and forget an API call

0 VIEWES 0 LIKES 0 DISLIKES SHARE
0 LIKES 0 DISLIKES 0 VIEWES SHARE

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

You must be Logged in to reply
Trending Technologies
15
Software40
DevOps47
Frontend Development24
Backend Development20
Server Administration17
Linux Administration26
Data Center24
Sentry24
Terraform23
Ansible83
Docker70
Penetration Testing16
Kubernetes21
NGINX20
JenkinsX17
Recommended Blogs
1
Techiio-logo

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Developed and maintained by Wikiance
Developed and maintained by Wikiance