c# - Await HttpClient.PostAsync() timing out. Have I missed something? -


i have 2 web apis, 1 made in .net core , in python using flask. trying make .net core api post endpoint in python-flask api , response message in return.

i using system.net.http when gets await httpclient.postasync() hangs indefinitely , timeout. what's more strange works fine, connects , gets response no problems.

i attempted debug python-flask api try , find if/where gets stuck seems never reaches python-flask api, sends request , waits indefinitely.

this code in .net core api:

        httpresponsemessage responsemessage = null;         var pairs = new dictionary<string, string>         {             {"key", key}         };          var keycontent = new formurlencodedcontent(pairs);         var client = new httpclient {baseaddress = new uri("http://localhost:5000/")};         responsemessage = await client.postasync("token", keycontent); 

this sending key /token endpoint , awaits response.

if necessary add python-flask api code well. in case receive key .net core api sent, verify , send token never reaches (and responds when reach it) feel isn't necessary of yet.

am missing here? fact works fine bugs me.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -