This is a migrated thread and some comments may be shown as answers.

Visual Studio posting asp.net httpwebrequest - can't see header or request body

1 Answer 678 Views
Windows
This is a migrated thread and some comments may be shown as answers.
Avram
Top achievements
Rank 1
Avram asked on 14 Sep 2017, 06:59 PM

I am using Visual Studio and C# to post a request to my client's https: api service (a Java/Unix platform).

They claim I am not sending the payload (request body).

My code uses a common practice method HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://client.com/api/login");

I then create the JSON from a data structure using the JavaScriptSerializer as 

     loginInfoSerialized = new JavaScriptSerializer().Serialize(loginInfo);

I add request.Headers.Add as needed by the client.  And then write the request stream using:

            StreamWriter streamPost = new StreamWriter(request.GetRequestStream());
            streamPost.Write(loginInfoSerialized);

All pretty standard.  However, I am not able to capture/see the outgoing HTTPS request in Fiddler to confirm the header and payload data is being sent from my development platform (Windows 7).  My firewall is disabled.

I do see a "Tunnel to" in the Host column, but nothing recognizable (https decipher??)  

Should I be doing something different to see the outbound packets?

Thanks.

 

 

1 Answer, 1 is accepted

Sort by
0
Alexander
Telerik team
answered on 19 Sep 2017, 11:06 AM
Hello,

You have to turn on HTTPS decryption and trust Fiddler's root certificate.

Regards,
Alexander
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Windows
Asked by
Avram
Top achievements
Rank 1
Answers by
Alexander
Telerik team
Share this question
or