Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to send POST data to a webserver?
#10
(05-02-2018, 12:45 PM)BosseB Wrote: I have never used the log component before and now when I look at the Indy10 docs I see that there are several such object to choose from. Don't know how to set it up and how to view its output...

The easiest one to use would be TIdLogFile. Simply set its FileName property to the full path of an output file of your choosing, and its Active property to True. Then assign it to the TIdHTTP.Intercept property. Everything the TIdHTTP reads from, and writes to, the socket will be written to the log file. Then you can view the file in whatever text editor you want.

(05-02-2018, 12:45 PM)BosseB Wrote: I managed to set up a filter to capture the traffic on the http port with the IoT device IP address so I could capture the  actual data both for the FireFox case and using my FPC config application:

Code:
tcp port http and host 192.168.119.249

A simpler filter would be:

Code:
http && host==192.168.119.249

(05-02-2018, 12:45 PM)BosseB Wrote: But these captures could only be viewed inside of Wireshark and then only one at a time, so it is very difficult to compare for differences.

You can run multiple instances of Wireshark at a time. Save each capture to a separate .pcap file, and then open each file in a separate Wireshark instance so you can view them side-by-side.

Or, once you have the captures, you can export (not save) just the captured HTTP data to separate .txt files, and then you can open them in whatever text viewer you want.

(05-02-2018, 12:45 PM)BosseB Wrote: Tried to load a saved log into a text editor but that only showed unreadable data even though I saved to a text file format...

Then you didn't actually save it to a text format.

Reply


Messages In This Thread
How to send POST data to a webserver? - by BosseB - 04-30-2018, 09:56 PM
RE: How to send POST data to a webserver? - by rlebeau - 05-02-2018, 05:13 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)