Spanish Total.js
English
Documentation For AI agents
Contents

Route

The settings of the Route component, which receives HTTP requests.

.md GitHub
On this page

Route registers an HTTP address on the LessCode server and sends each request to its Request output. The address works after you apply. A Route must lead to a Response, which answers the request.

The Route settings

SettingWhat it does
MethodGET, POST, PUT, PATCH, DELETE or API.
Relative URL addressThe path, for example /api/hello/. It is added to the address of LessCode.
Allow uploading files (form data)For requests that upload files. Read files to sets the form of the files.
TimeoutThe time limit of a request, in milliseconds. Default 5000.
Request limitThe largest request body, in kB. Default 5120.
Send to outputWhat the node sends: Everything, Payload, Query arguments, Files, Dynamic params, Headers, Cookies or User.

What the node sends

With Everything, the data is an object with the request details, among them query (query arguments), body (the request body), headers, params, cookies, ip and url. For example, value.query.name reads ?name=Jane. See Create a GET endpoint.

With Payload, the data is the request body only. See Create a POST endpoint.

Things to know

  • While the flow is paused, the address answers 503.
Made in Europe