Tech Tip: Get Requests with HTTP Request vs. HTTP Get
PRODUCT: 4D | VERSION: 20 | PLATFORM: Mac & Win
Published On: July 29, 2024
The HTTP Request command allows the user to send different request methods rather than the HTTP Get command that handles only GET requests. The user can use HTTP Request to send a GET request, the difference between them lies in HTTP Request’s ability to add a request body to handle other request types. Otherwise they may be used interchangeably, the body being able to be left an empty string for GET requests.
Example with HTTP Request:
var $url_t; $result_t; $body_t : Text $url_t:="https://exampleapi.com/path" $body_t:="" HTTP Request(HTTP GET method; $url_t; $body_t; $result_t) |
This HTTP Request can be replaced with the following HTTP Get:
HTTP Get($url_t; $result_t) |