How to make POST request
POST request is performed with “POST” action. Here is the action interface:
Action has 3 section: Url, Post Data and Additional Parameters.
Url is actually url, which will be loaded.
Post Data
Post Data section specifies what data http client will send to server. Main parameter here is “Post Data” field, you can fill that field with “Request Parameter Name”, “Request Parameter Value” and one of following button “+Add”, “+Add As File” and “+Add As Base64 Data”, like this:
“Post Data” field contain list of keys and values post parameters, for example:
"key1","value1","key2","value2"
Keys and values can be obtained from resources or variables:
"key_resource",{{resource}},"key_variable",[[VARIABLE]]
Values can be filenames, to add filename use “+Add As File” button, this will produce result like:
"filename","file://c:/test/123.jpg"
If your post data contains filename, you may want to set Content Type to multipart.
If you need to post binary data, use “+Add As Base64 Data” button, for example, to post russian word “привет”, use
"test","base64://0L/RgNC40LLQtdGC"
Content Type
Content Type determines how your post data will be rendered. Lets examine, how “key1”,“value1”,“key2”,“value2” will be rendered depending on Content Type.
If Content Type equals to “urlencode”:
key1=value1&key2=value2
If Content Type equals to “json”:
{ "key1": "value1", "key2": "value2" }
If Content Type equals to “multipart”:
--rpwhruhhizxcqycddwywfcfbngobfprktrefzzpy Content-Disposition: form-data; name="key1"; value1 --rpwhruhhizxcqycddwywfcfbngobfprktrefzzpy Content-Disposition: form-data; name="key2"; value2 --rpwhruhhizxcqycddwywfcfbngobfprktrefzzpy--
Arbitrary post data
To put arbitrary data inside post body use Content Type parameter equal to “custom” and “Post Data” to
"data","POST DATA HERE"
Like this:
Additional Parameters
Last 2 params is encoding and method. “Encoding” is encoding name which will be applied to post data.
Method means http method. In most cases you can use default value “POST”. Buttons next to edit field holds most used methods, and arbitrary string is also acceptable.