Although a potential content type can be used to upload to HTTP, in practice three types are used:
- One that is defined in this service documentation.
- application / x-www-form-urlencoded - The default is HTML forms.
- multipart / form-data is another form used by HTML formats, necessary when it includes form loading.
Due to the fact that 2 and 3 are used so often (since they are supported by the entire browser for submitting forms), almost all server technologies have everything for processing them. Therefore, if part of PHP does not do something strange, you can also use it.
application / x-www-form-urlencoded is not suitable for some data, but is the easiest for what it is used for. This is pretty much the same as how query strings are created for GET form requests, but as POST content.
Therefore, you want your content to be:
"params=" + Uri.EscapeDataString(paramData)
Thus, the first becomes:
params=%7B%22object%22%3A%22Main%22%2C%22function%22%3A%22doecho%22%2C%22params%22%3A%5B%22echothis....%22%5D%7D
And the second:
params=%7B%22object%22%3A%22Ccmes_Main%22%2C%22function%22%3A%22doecho%22%2C%22params%22%3A%5B%22echothis%2525%255d%2522%2540%253d%2526....%22%5D%7D
Both of the built-in PHP modules will return to the forms in your question.
source share