All right, let’s rewind a bit. I had clearly written poorly my old notes regarding HttpClient activity. I just run a few tests and here are the results:
GET request doesn’t, by standard definition, have a message body - it’s reserved only for PUT/POST requests. Instead, GET of course sends any associated data as part of the url, and as such, never needs a Content-Type header anyway. I have a recollection from the past that sending a body in a GET request is technically possible, but then again, it should not be used while GETting stuff done.
Unlike GET, POST request does use body to deliver data, along with the Content-Type header. These can be adjusted to a degree in HttpClient, and here’s how:
If you need Content-Type header application/json or application/xml, place either one (unquoted) into BodyFormat field and fill the stringified request body into Body field.
To use application/x-www-form-urlencoded Content-Type, simply fill key-value pairs into Parameters collection.
Note that if you’ve added at least one key-value pair into Parameters collection, everything typed into Body field will be overridden by Parameters and Content-Type will be forced to application/x-www-form-urlencoded.
As a final note, you can’t have the HttpClient activity recognize any Content-Type header via Headers collection, so you’ll always want to stick with using BodyFormat field (except for when using Parameters). Out of content types other than those mentioned here, at least text/plain will get recognized as well. I suppose other ones should work as well.