1. Examining the variables on Eclipse I've been doing already. But would like to have the request content in the format it is submitted through HTTP to make sure I understand exactly what is being submitted.
2. Yes, what I need is exactly what Chrome Dev Tools can display. The issue is that this is an API, not an webapp so I can't open it on the browser.
3 and 4. Not sure how to do this.
The exact format of an HTTP request is defined in a series of documents called RFC's. These Request For Comment specs are published to establish various Internet standards for the web, email, and numerous other services. So to see how to form a legal HTTP request, you have to reference these documents
I think the latest RFC for HTTP is RFC6585. Basically, though, an HTTP request is text comprising a URL request, followed by headers, one per line, followed by 2 newline characters (making a blank line) followed by the request body which can be in POST form format (there's an RFC for that), or just general text like a JSON or YAML request string. Or an HTML GET. Or no body at all, like the API for my home automation system uses.
Essentially, though, it you are using a client library like Java's Http client library, all the basic stuff is guaranteed to be the right stuff in the right places. In fact, even automatically passing cookies back and forth, which is essential for maintaining HttpSessions on the server. So what you see in the servlet is going to be OK.
HTTPS is identical except that data is encrypted.
The HTTP format is deliberately simple and text-based. Back when the Internet was new, a lot of stuff got routed through multiple machines. Some used ASCII, some used EBCDIC, some were bytewise-discontinuous (DEC and later Intel), some bytewise-continuous (IBM, Motorola), different word lengths. Different byte lengths! The one thing they had in common was some sort of native text form that could (mostly) be automatically translated from machine to machine as it bounced along. This is also why Base64 is popular for MIME formatting of binary. Base64 is text and only uses characters that a 7-bit character set (such as the original ASCII) would have.
Another reason why text was so popular back then was that it was easy to test. You can literally use the telnet remote teletype application to submit HTTP GET and POST requests by simply typing in the HTTP data in the form I mentioned earlier. Unfortunately, telnet doesn't deal with things like HTML, however, so what you get back is going to be raw text. Email, incidentally, also can be tested this way!
Bjoke: A "Bully Joke". A Statement or action made with malicious intent - unless challenged. At which point it magically transforms into "I was just funnin'" or "What's the matter, can't take a joke?"
Tim Holloway wrote:If you're a network geek, you can capture the whole shebang using a tool such as tcpdump/wireshark.
I do this quite often, but you will need privileged access to the hosting platform (typically command-line shell access). Also if you are using HTTPS (HTTP over TLS) then it will be more challenging or maybe not possible at all.