ComfyUI Node

HTTP POST Request

The node that sends your images and prompts to the outside world

By wawahuy·Created about a year ago·Updated 11 months ago· 14
HTTP POST Request
  • session
  • auth
  • form_data
  • status_code
  • headers
  • content
  • json
urlhttps://api.example.com/data
content_typejson
headers{}
json_data{}
raw_data
timeout30
verify_ssltrue
allow_redirectstrue
cookies{}
proxy_url

If HTTPGet is how ComfyUI reads the world, HTTP POST Request is how it writes back. POST is the "create something" method - submit a job, send a caption, upload a file, call an LLM's completion endpoint - and this node handles all four body styles you'll ever need: JSON, form-encoded, raw text, and multipart form data. It's the second half of any real automation workflow, and the only node in the pack that can carry a generated image out the door.

How it works

Two required inputs: url and content_type. The content_type choice decides which body input to fill:

  • json (default) - type a JSON object into json_data; it's sent with Content-Type: application/json. The default for talking to REST APIs and LLM endpoints.
  • form - json_data is sent as application/x-www-form-urlencoded. For classic web forms.
  • raw - send raw_data as-is, for anything that isn't JSON, like a plain text body.
  • form-data - multipart. This is where the form nodes come in: plug an HTTP_FORM_DATA object (from HTTP Form Data) into the form_data input, and any files/images it carries go out as multipart fields.

Optional inputs: session, auth, headers, cookies, timeout, verify_ssl, allow_redirects, proxy_url - the standard set, working exactly as they do on HTTPGet.

Four outputs: status_code, headers, content, json (the body, pretty-printed if it parses as JSON).

The combo that makes it special

HTTPPost is the only place an HTTP_FORM_DATA object plugs in, which means it's the terminal node of the upload pipeline:

[VAE Decode] → [HTTP Form Image Item] ─┐
                                        ├→ [HTTP Form Data] → [HTTPPost: form-data]
[prompt] → [HTTP Form Text Item] ───────┘

A rendered image plus its metadata, in one request, with no temp files. That's the workflow this pack exists for.

Install

ComfyUI Manager → search "ComfyUI-HTTP" → Install, restart. Manual:

cd ComfyUI/custom_nodes/
git clone https://github.com/wawahuy/ComfyUI-HTTP.git
cd ComfyUI-HTTP
pip install -r requirements.txt

No model downloads; plain requests.

Where people get burned

The #1 mistake is picking json and then typing invalid JSON into json_data - the node logs a warning and sends the raw string instead, which most APIs reject. Use HTTP Convert JSON's minify/format if you're unsure of your payload. Second: for form-data uploads, if the form_data input is empty the node falls back to sending json_data as a plain form body - so a disconnected form node silently produces a body with no file in it. And as always, a failed request returns status_code = 0 with the error in content rather than erroring - check it.

CategoryHTTP/Methods

Inputs (13)

NameTypeDefaultDescription
urlSTRINGhttps://api.example.com/data
content_typeCOMBOjson4 options: json, form, raw, form-data
sessionoptHTTP_SESSION
authoptHTTP_AUTH
headersoptSTRING{}
json_dataoptSTRING{}
form_dataoptHTTP_FORM_DATA
raw_dataoptSTRING
timeoutoptINT301–300
verify_ssloptBOOLEANtrue
allow_redirectsoptBOOLEANtrue
cookiesoptSTRING{}
proxy_urloptSTRING

Outputs (4)

NameTypeDescription
status_codeINT
headersSTRING
contentSTRING
jsonSTRING