/extractparams

This endpoint is useful for extracting query parameters from a given query string. It takes a query string as input and returns an object containing the extracted parameters.

Method

GET

Query Parameters

  • str: (Required) A query string containing parameters to be extracted. The parameters should be in the format key1=value1&key2=value2.

How to Make a Call

To call this endpoint, make a GET request to the following URL with the required query parameter:

https://node.nodetrigger.com/extractparams?str=your_query_string

Replace your_query_string with the actual query string you want to extract parameters from.

Example Calls

Example 1

Extracting parameters from a query string with multiple parameters:

Request:

GET https://node.nodetrigger.com/extractparams?str=name=John&age=30&city=NewYork

Response:

{
    "name": "John",
    "age": "30",
    "city": "NewYork"
}

Example 2

Extracting parameters from a query string with a single parameter:

Request:

GET https://node.nodetrigger.com/extractparams?str=country=USA

Response:

{
    "country": "USA"
}

Notes

  • If the str query parameter is missing, the endpoint will return a 400 status code with the error message: {"error": "Missing query string"}.
  • If no parameters are found in the query string, the endpoint will return a 404 status code with the error message: {"error": "No parameters to extract"}.