Maya Docs
  • Introducing Maya
  • Product
    • Command Bar
    • Workspaces
      • Importing JSON Workflows
    • Modules
      • Config Profiles
    • Node Library
      • Common
        • Inject
        • Debug
        • Complete
        • Catch
        • Status
      • Functions
        • Function
        • Change
        • Switch
        • Template
        • Range
        • Delay
        • Trigger
        • Filter
        • Exec
      • Storage
        • Read File
        • Modify File
        • Watch Files
      • Parser
        • CSV
        • HTML
        • JSON
        • XML
        • YAML
      • Sequence
        • Split Into Array
        • Join Array
        • Sort Array
        • Batch Messages
      • Dashboard
        • Button
        • Chart
        • Slider
        • Gauge
        • Switch
        • Dropdown
        • Numeric Input
        • Text Input
        • Template
        • Date Picker
        • Colour Picker
        • Form
        • Display Text
        • Audio Out
      • Network
        • Websockets
          • Websocket Out
          • Websocket In
        • HTTP
          • HTTP In
          • HTTP Response
          • HTTP Request
      • Command Bar
        • Bot Scheduler
        • Bot Command In
        • Bot Command Out
          • Bot Response
          • Bot Web Card
          • Bot Dash Card
        • Custom Search In
        • Custom Search Out
        • Bot Info
      • Spotify
        • Get Playback State
        • Control Playback
        • Play
        • Library
        • Playlist
        • Search
    • Web Extension
      • Selecting Elements
      • Making a web automation skill in 5 minutes
    • Troubleshooting
    • Changelog
  • Tutorials
    • Install skills/modules from store
    • Building fundamentals
    • Connect different services
      • Spotify + Figma
      • Zoom + Google Calendar
    • Browser Automation
      • Control YouTube - Easy
      • Scrape Twitter - Moderate
      • Manage Gmail Inbox - Hard
Powered by GitBook
On this page
  1. Product
  2. Node Library
  3. Network
  4. HTTP

HTTP Response

Sends responses back to requests received from an HTTP Input node.

PreviousHTTP InNextHTTP Request

Last updated 3 years ago

Was this helpful?

CtrlK
  • Inputs
  • Outputs
  • Details :

Was this helpful?

Inputs

  • payload (string) : The body of the response.

  • statusCode (number) : If set, this is used as the response status code. Default: 200.

  • headers (object) : If set, provides HTTP headers to include in the response. cookiesobject If set, can be used to set or delete cookies.

Outputs

No outputs, this is a final node.

Details :

The statusCode and headers can also be set within the node itself. If a property is set within the node, it cannot be overridden by the corresponding message property.

Cookie handling

The cookies property must be an object of name/value pairs. The value can be either a string to set the value of the cookie with default options, or it can be an object of options.

The following example sets two cookies - one called name with a value of nick, the other called session with a value of 1234 and an expiry set to 15 minutes.

msg.cookies = {
    name: 'nick',
    session: {
        value: '1234',
        maxAge: 900000
    }
}

The valid options include:

  • domain - (String) domain name for the cookie

  • expires - (Date) expiry date in GMT. If not specified or set to 0, creates a session cookie

  • maxAge - (String) expiry date as relative to the current time in milliseconds

  • path - (String) path for the cookie. Defaults to /

  • value - (String) the value to use for the cookie

To delete a cookie, set its value to null.

\