Sign Up

Send External HTTP Request

Using Twidget, you can send external HTTP requests effortlessly. This functionality allows you to communicate with external servers or APIs. Below, you will find the necessary parameters and structure to set up an HTTP request.

-

Parameters

  • URL: The endpoint to which the request will be sent.

  • Method: The HTTP method (GET, POST, PUT, DELETE, etc.).

  • Parameters: Key-value pairs appended to the URL in the format key=value.

  • Headers: Metadata sent with the request, structured as key-value pairs.

  • Body: Data sent with the request. Applicable for methods like POST and PUT.

  • Timeout: The duration before the request times out, specified in seconds.

Response Structure

The response of the request will be stored as a variable with the following schema:


{

  "status": number,

  "status_text": text,

  "headers": {object},

  "data": {object}

}
  • status: The HTTP status code returned by the server.

  • status_text: Textual representation of the HTTP status code.

  • headers: Headers returned in the response.

  • data: The body of the response, usually in JSON format.

By following the structure and examples provided, you can easily configure and send HTTP requests using Twidget, as well as handle and process the responses.

Related Topics

Security

Twidget provides several built-in functions to enhance the security of your applications. Below is an overview of each security command, including its description, inputs, and outputs. Generate ID. Description: Generates a unique identifier. None - Type: Text Hash Text. Description: Hashes the provi...

Loops

In Twidget, loops allow you to execute commands multiple times, either based on a condition or through a set number of iterations. Loops can also be nested, meaning you can run loops within other loops, creating complex logic for your tasks. List Loop. The `List Loop` command enables you to loop thr...

Math

Twidget offers a variety of commands to manipulate numbers. Below are the math commands available, along with their descriptions, inputs, and outputs. Sum. Description: Adds together a list of numbers and returns the sum. - Inputs: - `numbers`: A list of numbers to be added together. - Output: A sin...

Send Message

Send SMS Command. With Twidget, you can send SMS messages to phones using the `Send SMS` command. This functionality varies depending on the provider. Currently, we support Twilio as the SMS provider. To use Twilio for SMS integrations, you will need: - A Twilio account ID - Twilio Auth Token - A Tw...

Miscellaneous

Twidget provides several miscellaneous commands to facilitate various tasks. Is Null. Description: Checks whether the provided value is null or not. Inputs: - value: The value to be checked. Output: - boolean: Returns `true` if the value is null; otherwise, returns `false`. Not Null. Description: Ch...