post
HTTP POST request with a JSON-parsable return
Fetches a page from a URL via HTTP/S POST request.
post url -> <stdout>
<stdin> -> post url content-type -> <stdout>
» post google.com -> [ Status ]
{
"Code": 405,
"Message": "Method Not Allowed"
}
POST
returns a JSON object with the following fields:
{
"Status": {
"Code": integer,
"Message": string,
},
"Headers": {
string [
string...
]
},
"Body": string
}
The concept behind this is it provides and easier path for scripting eg pulling specific fields via the index, [
, function.
post
as a methodRunning post
as a method will transmit the contents of STDIN as part of the body of the HTTP POST request. When run as a method you have to include a second parameter specifying the Content-Type MIME.
post
has a number of behavioral options which can be configured via murex’s standard config
tool:
config: -> [ http ]
To change a default, for example the user agent string:
config: set http user-agent "bob"
post: google.com
This enables sane, repeatable and readable defaults. Read the documents on config
for more details about it’s usage and the rational behind the command.
[[
(element): Outputs an element from a nested structure[
(index): Outputs an element from an array, map or tableconfig
: Query or define murex runtime settingsget
: Makes a standard HTTP request and returns the result as a JSON objectgetfile
: Makes a standard HTTP request and return the contents as murex-aware data type for passing along murex pipelines.This site's content is rebuilt automatically from murex's source code after each merge to the master
branch. Downloadable murex binaries are also built with the website.
Last built on Mon Feb 13 09:18:06 UTC 2023 against commit f339958f33995895c1d997efcdbb8408d2c8d45f8b5f934.
Current version is which has been verified against 13950 tests cases.