Please bear with me as I have been reading and trying to understand HTTP and the different requests available in its protocol but there are still a few loose connections here and there.
Specifically, I have been using Apache's HttpClient to send requests, but I'm unsure of a few things. When we make a request to a URI, how can we know before hand how to properly format say a PUT request? You might be trying to transmit data to fill out a form, or send an image, etc. How would you know if the server is capable of receiving that format of request?
If you try to PUT without any knowledge of the server this request will "fail" (or not - depends on the implementation e.g. it can redirect you to main page). 
Failure is indicated by the server response code along with headers. E.g. 405 Method Not Allowed or 400 bad request etc. Or redirect you to main page: 302 Found
You, as a client, must adapt to the server's API.
Moreover different requests to the same API may give you different specs e.g.
One response is gzipped & with ETag & cached, the other one is not.
Or plain GET / will give you HTML and GET /?format=json will give you JSON.
How to determine how to format an HTTP request to some server