Sign Up

Inputs

Overview

In Twidget, inputs are essential elements that allow you to configure endpoints and functions. Events do not use inputs.

-

Endpoint Inputs

Endpoint inputs are used to retrieve data from requests. The available types of endpoint inputs are:

  1. Path: Variables that are part of the URL path.

  2. Query: Variables that are part of the query string in the URL.

  3. Header: Information included in the request headers.

  4. Body: Data included in the request body.

  5. Files: Files uploaded in the request. Only endpoint files can be lists.

Function Inputs

Function inputs are used to pass data to functions within the platform. They can be of various data types, including:

  1. Text: String data.

  2. Number: Numeric data.

  3. Boolean: True/false values.

  4. Date: Date values.

  5. Object: Complex data structures.

  6. File: File data.

All function inputs can be lists.

Common Features

  • Required Inputs: You can mark an input as required. If a required input is not provided, an error will be thrown.

  • Default Values: Many input types allow you to set a default value that will be used if no input is provided.

Utilizing Inputs

Inputs can be referenced throughout the no-code builder. For endpoint inputs, you will need to use specific prefixes:

  • $body.: For inputs retrieved from the request body.

  • $headers.: For inputs retrieved from the request headers.

  • $files.: For files included in the request.

  • $path.: For variables included in the path.

  • $query.: For variables included in the query string.

Input Selector

When referencing an input in the value or variable builder, you can:

  1. Select Input as the type.

  2. A dropdown of available inputs will be displayed.

  3. Use the search functionality within the dropdown to quickly find the input you need.

Related Topics

Changes

In Twidget, every modification you make in our no-code builder is meticulously documented and stored as a change. Whether you are creating an input or editing a command, each action is captured in the platform. Important: Please note changes will not go live until they are published. Viewing Changes...

Variables

Variables are essential building blocks in Twidget that allow you to store and manipulate data dynamically within your no-code applications. They enable you to create flexible and interactive applications by holding values that can be changed and referenced throughout your workflow. Creating Variabl...

Publishing Changes

With Twidget's publishing feature, you can seamlessly push your changes live, ensuring that your updates take effect on the specified endpoint, function, or event. This feature also allows for version control, enabling you to revert and manage different versions of your changes effectively. Steps to...

Functions

In Twidget, you can build custom reusable functions. These functions can be utilized across various sections including endpoints, events, and other functions. Instead of creating the same commands repeatedly, you can create a function once and reuse it wherever necessary, making your workflow more e...

Testing

In Twidget, you can easily test your endpoints and functions directly within our code builder. This guide will walk you through the steps to efficiently test your functions to ensure they meet your requirements. Running Tests. To start testing, follow these steps: 1. Open Code Builder: - Navigate to...