节点 / builtin / core
Http Request
Makes a HTTP request and returns the response data
此内容尚不支持你的语言。
Call any web address or API and use the response in the next steps.
What it does
Section titled “What it does”Http Request sends one request (GET, POST, PUT, DELETE, PATCH, OPTIONS or HEAD) to URL, with the headers, query parameters and body you set, and returns what the server sends back.
- Authentication adds an
Authorizationheader from a saved credential, so API keys stay out of the workflow. - Query Params are added to the URL for you.
- Body is sent as JSON, as a URL-encoded form or as multipart form data, depending on Body Content Type.
- Redirects are followed (up to Max redirects) unless you turn that off.
- The response is read as JSON, text or a file. Response format set to autodetect decides from the server’s content type.
A file response (an image, a PDF, a download) arrives as binary data under the data key, ready for file uploads such as Slack File → Upload, Google Drive File → Create or Gmail attachments.
When to use it
Section titled “When to use it”- Call an API that has no dedicated node.
- Download a file or a JSON feed.
- Send data to a webhook (Zapier, Make, your own server).
For apps that have their own node, such as Slack or Notion, that node is easier. To read a web page as text, Get All Text from Link is simpler.
Inputs and settings
Section titled “Inputs and settings”| 设置项 | 类型 | 作用 |
|---|---|---|
| Method | Choice | The request method to use. Options: GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD. 默认值:GET |
| URL (必填) | URL | Security: Ensure the URL is from a trusted source. Avoid including sensitive data in URL parameters. |
| Authentication | Credential | The authentication to use to make the request. |
| Headers | Key-value pairs | The headers to send with the request. |
| Query Params | Key-value pairs | The query params to send with the request. |
| Body | Group | The body to send with the request. |
| Body › Body Content Type | Choice | Content-Type to use to send body parameters. Options: application/json, application/x-www-form-urlencoded, multipart/form-data. 默认值:application/json |
| Body › Body | Key-value pairs | The body to send with the request. |
| Options | Group | The options to send with the request. |
| Options › Redirects | Group | The options to send with the request. |
| Options › Redirects › Follow redirects | Toggle | Follow redirects. 默认值:On |
| Options › Redirects › Max redirects | Number | The maximum number of redirects to follow. 默认值:10 |
| Options › Response | Group | The options for the response. |
| Options › Response › Include response header and status | Toggle | Whether to return the full response (headers and response status code) data instead of only the body. 默认值:Off |
| Options › Response › Response format | Choice | The format in which the data gets returned from the URL. Options: autodetect, json, text, file. 默认值:autodetect |
| Options › Timeout (ms) | Number | Time in ms to wait for the server to send response headers (and start the response body) before aborting the request. 默认值:10000 |
Outputs
Section titled “Outputs”-
Output
By default the item is { data }, the response body. Turn on Include response header and status to also get status, statusText, headers and the final url after redirects.
Dependencies and credentials
Section titled “Dependencies and credentials”- Authentication (connection): optional. See Create a connection.
Choose a credential of the type your API expects, for example a bearer token or basic auth. See Create a credential.
Example workflow
Section titled “Example workflow”- A Context Menu trigger on a link.
- Http Request, POST to your webhook URL, Body Content Type
application/json, with a body fieldurl={{ $input.linkUrl }}. - Browser Notification: “Sent”.
Common issues
Section titled “Common issues”- “Response status: 401” or “403”. The credential is missing, wrong or lacks permission. Check the Authentication field and the key’s rights.
- “Response status: 404”. Check the URL and the query parameters.
- “URL validation failed”. The URL is malformed or not allowed. Use a full
https://address. - “Maximum redirects exceeded”. The site redirects in a loop, or more times than Max redirects allows.
- It works in the extension but fails in the web app. Some sites refuse requests sent from another website (a browser rule called CORS). Run the workflow from the extension.
- The request times out. Raise Timeout (ms) under Options; the default is 10 seconds.
Related nodes
Section titled “Related nodes”- Poll Until: call a URL repeatedly until it reports done.
- HTML Extract: pull values out of an HTML response.
- JSON: reshape a JSON response.
- HTTP Request Tool: let an AI agent make requests.