Loading

Back to Home

$httpGet

$httpGet sends a GET request to an API. Use this when you only need to read data. GET requests are the most common type of HTTP request.

Syntax

$httpGet[Url]

What happens

  1. $httpGet sends a request to the URL you give it.
  2. The API processes the request and sends data back.
  3. The response is stored in memory. Use $httpResult to see it.

Example 1: Basic GET request

Fetch a random quote from a quotes API:

$httpGet[https://api.example.com/quotes/random]
$httpResult

What happens:

  1. $httpGet requests a random quote from the API.
  2. The API returns the quote data.
  3. $httpResult displays whatever came back.

To extract specific parts of the response (like the quote text or author name), see the $httpResult page.

Example 2: GET with a specific resource

Some APIs let you request a specific item by including its ID in the URL:

$httpGet[https://api.example.com/users/1]
$httpResult

What happens:

  1. $httpGet requests the user with ID 1.
  2. The API returns that user's data.
  3. $httpResult shows the full response.

Common uses

See also