get
- Command ReferenceMakes a standard HTTP request and returns the result as a JSON object
Fetches a page from a URL via HTTP/S GET request
get url -> <stdout>
<stdin> -> get url -> <stdout>
» get google.com -> [ Status ]
{
"Code": 200,
"Message": "OK"
}
get
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.
### `get` as a method
Running `get` as a method will transmit the contents of STDIN as part of the
body of the HTTP GET request. When run as a method you have to include a second
parameter specifying the Content-Type MIME.
### Configurable options
`get` 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"
get: 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 settingsgetfile
: Makes a standard HTTP request and return the contents as Murex-aware data type for passing along Murex pipelines.post
: HTTP POST request with a JSON-parsable returnThis 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 Fri May 19 22:45:48 UTC 2023 against commit 54b5f6754b5f67b250bbf7353e83c42ed187802584c3ae3.
Current version is 4.1.6140 which has been verified against 14045 tests cases.