OCLOperators RestGet
No edit summary
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<message>Write the content here to display this box</message>
The RestGet operator is a sub-command of OCLOperators that allows you to execute GET requests on RESTful APIs. It sends a GET request to a specified URL and returns the response from the server.
The RestGet operator is a sub-command of OCLOperators that allows you to execute GET requests on RESTful APIs. It sends a GET request to a specified URL and returns the response from the server.


Line 8: Line 9:
This command sends a GET request to the https://api.example.com/users endpoint with a query parameter ID set to 12345 and an Authorization header containing a bearer token. The response from the server will be printed to the console.
This command sends a GET request to the https://api.example.com/users endpoint with a query parameter ID set to 12345 and an Authorization header containing a bearer token. The response from the server will be printed to the console.


Please see: [[OCLOperators RestPost]]
'''Please see:''' [[Documentation:OCLOperators RestPost|OCLOperators RestPost]]
[[Category:OCLOperators]]
[[Category:OCLOperators]]
{{Edited|July|12|2024}}
{{Edited|July|12|2025}}

Latest revision as of 05:56, 6 February 2025

This page was created by Hans.karlsen@mdriven.net on 2017-09-29. Last edited by Stephanie@mdriven.net on 2025-02-06.

The RestGet operator is a sub-command of OCLOperators that allows you to execute GET requests on RESTful APIs. It sends a GET request to a specified URL and returns the response from the server.

To use the RestGet operator, provide the URL of the API endpoint you want to access. You can also provide query parameters or headers as necessary to customize the request.

For example, the following command can be used to execute a GET request using the RestGet operator:

selfVM.RestGet('https://api.example.com/users?id=12345', 'Bearer', '<token>','')

This command sends a GET request to the https://api.example.com/users endpoint with a query parameter ID set to 12345 and an Authorization header containing a bearer token. The response from the server will be printed to the console.

Please see: OCLOperators RestPost