-
Notifications
You must be signed in to change notification settings - Fork 0
Request Command
Léo Peyronnet edited this page Jul 15, 2024
·
1 revision
The request
command makes a request to the specified resource.
itcli request <method> <url> [options]
- method: The method to use when executing the request. See the table below for choices and descriptions.
- url: The URL where to send the request.
-
-c
or--content
: Only outputs the content of the response. Default:False
. -
-h
or--help
: Shows help text.
Value | Description |
---|---|
Get | Retrieves data from the specified URL |
Post | Submits data to the specified URL |
Put | Updates data at the specified URL |
Delete | Deletes data at the specified URL |
Head | Retrieves headers from the specified URL without the body |
Options | Retrieves supported HTTP methods from the specified URL |
Patch | Applies partial modifications to data at the specified URL |
Merge | Merges data with the resource at the specified URL |
Copy | Copies data from the specified URL |
Search | Searches for data at the specified URL |
To make a basic GET request to a URL:
itcli request get https://example.com
To make a POST request and only output the content of the response:
itcli request post https://example.com --content
Tip
You can save the content of the response to text file by using itcli request post https://example.com --content > response.txt