HTTP GET

Fetch data from an API


How to Use

Brick to perform GET requests.

Add this brick and put the URL you want to perform a GET request on in the ‘url’ field.

You can either have parameters in the url or generate them automatically using the ‘params’ field.

Similarly the headers field is used for the headers you want attached. If there is an applicable service on Pixiebrix for the resource you’re making a request to, you can enter that in the service field to have the request also use headers etc from that service.

Note that compared to the HTTP request brick, there isn’t a data field. This should not make a difference if the resource is following HTTP recommendations, but in the event that they aren’t the HTTP request brick can be set to ‘get’.

Use Cases

  • Perform GET request to URLs with optional params

Additional resources

https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods

https://www.w3schools.com/tags/ref_httpmethods.asp


Inputs

Name Required Type Description
url string The API URL
params object The URL parameters
headers object Additional request headers
service integration Optional. The integration to authenticate the request, if authentication is required

Outputs

Name Required Type Description
No outputs for this brick defined.

Details

ID @pixiebrix/get
Author @pixiebrix
Version 1.7.0
Created Aug. 17, 2021
Updated May 26, 2022