When searching SO regarding the topic Http GET with request body/parameters
it often ends in a debate regarding whether to do it or not - even though the OP simply asks for examples.
Now I am asking again if anyone does have some simple examples
of how to do it, looking away from the fact that some (old) systems might not be able to process the request.
Ian Kemp has shown, that it can be done here: Possible for HttpClient to send content or body for GET request?
But honestly my coding "skills" aren't good enough to understand his example - is there a more simple example out there?
Where the body only contains fx 1 parameter
, that I want to check on. (No headers at all - since the headers are sliced off by the PaaS).
UPDATE - clarifying what I don't understand regarding Ian's example:
Content = new StringContent("some JSON", Encoding.UTF8, ContentType.Json),
I don't understand, how "some JSON" is being passed. Where does the Get-method fetch the JSON from? Is it from the URL, that is provided in the line above it?
I want to check the JSON/body
to check a parameters value, but can't figure out from Ian's example, how that is possible when I don't understand the "some JSON"-part..