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

Managing Files

Twidget offers a set of commands to manipulate files in your file store. Below are the descriptions and usage of each command to help you understand how to utilize them effectively. Get File. Retrieve a file via file path. Inputs: - `path`: The file path to retrieve the file from. Outputs: - `filena...

Text

Twidget offers a variety of commands to manipulate text in various ways. To Uppercase. Converts all characters of the provided text to uppercase. - text: The text to be converted to uppercase. - A text string with all characters in uppercase. To Lowercase. Converts all characters of the provided tex...

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...

Return

The `return` command in Twidget is a special command used to halt the current command workflow and immediately return a specified result. This command overrides any subsequent processes and outputs the return result regardless of the rest of the workflow logic. This command is particularly useful fo...

Local Storage

Twidget provides a set of local storage commands that enable interaction with the browser’s `localStorage` API through a no-code interface. These commands are useful for storing, retrieving, and managing key-value data persistently within the current domain context. Purpose. These commands abstract ...