Diagram
  • Introduction
  • Get Started
    • Hello World
    • Connecting to a DB
    • From a template
  • Concepts
    • Endpoints
    • Algorithm
  • Nodes
    • Bcrypt
    • Code
    • Constant
    • Database
    • EasyDB
    • Firestore
    • If / Then
    • Request
    • Response
    • JWT
    • Mapper
    • MongoDB
    • Stripe
    • Webhook
  • Templates
    • Login
    • Register
    • Get User
  • Resources
    • Dashboard
    • Contact
    • FAQs
Powered by GitBook
On this page
  • General
  • Input
  • Output
  • Use Cases

Was this helpful?

  1. Nodes

Request

PreviousIf / ThenNextResponse

Last updated 3 years ago

Was this helpful?

General

The Request node is used to receive any HTTP request (GET, POST, PUT, DELETE etc). It parses the data as headers, params and body and passes them on for further processing.

The Request node is a special node that is required for all requests and cannot be deleted.

Input

  • The Request node has no input.

Output

  • Headers: Returns an Object with the specified HTTP request header fields (case-insensitive match). Learn more on .

  • Params: Returns an Object containing properties mapped to the named route "parameters". For example, if you have the route `/user/:name`, then the "name" property is available as `req.query.name`. Learn more on .

  • Body: returns an Object containing key-value pairs of data submitted in the request body. Returns a `String` if rawBody is true and request type is not `Get`. Learn more on .

Use Cases

Call an external API parse and process the response.

  • Request (Get) ➡ Webhook ➡ Script ➡ Response (200)

Receive data from a request and save the to the database.

  • Request (Post) ➡ Database ➡ Response (200)

req.get
req.query
req.body