What actually goes out on an http client post request

wevets
Posts: 112
Joined: Sat Mar 09, 2019 2:56 am

What actually goes out on an http client post request

Postby wevets » Mon Jan 06, 2020 11:38 pm

I have an application in which I post json data to a web server, and the code works. But in delving into the entrails of what's going on, it seems that esp_http_client_perform() pulls a bunch of stuff from the client structure to assemble the packet that actually goes out. I've had to modify the client send code to get the headers right to send json data that would pass validation at the target server, and, as I said, it works. I'm doing this in the esp-idf and not in arduino.
Is there a single API that allows me to see as a string what is actually being sent out in a client http request? I'm curious to see what a request looks like as it goes out on the wire (or wifi in this case), or a single buffer in which a request as assembled before being sent that I can look at and/or send to a terminal? Or would I have to tediously trace through all the APIs apparently involved in sending a request to see what each of them is putting on the wire?

Thanks.

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 170 guests