HTTP PATCH Request
Send partial updates to APIs that want them
- session
- auth
- status_code
- headers
- content
- json
PATCH is the HTTP method for "change part of something, not all of it." It's what you use when you want to update a couple of fields on a remote resource without replacing the whole thing - bump a status, change one setting, add a tag. HTTP PATCH Request is the pack's node for it, and it's essentially a clone of HTTP PUT with PATCH semantics (and, notably, without the form-data mode PUT also lacks).
How it works
Two required inputs:
url- the resource you're partially updating, e.g.https://api.example.com/data/1.content_type-json(default) orraw. For JSON, put the partial payload injson_data; for raw, useraw_data. Unlike HTTPPost, there's noformorform-datamode here - PATCH is a JSON or raw-body affair.
Optional inputs are the standard pack set: session, auth, headers, cookies, timeout, verify_ssl, allow_redirects, proxy_url. The one that matters for partial updates is json_data - send just the fields that changed:
{"status": "approved"}
instead of the whole object.
Four outputs, identical to the other method nodes: status_code, headers, content, json.
When you'd use it
Automation loops against stateful APIs. Your workflow marks a job as done, flips a flag, or updates a record's metadata after generating - all of those are PATCH-shaped operations. If the API's docs say "PUT replaces the whole resource, PATCH updates a subset," respect that: PUT with a partial body on some servers will wipe the fields you omitted, and PATCH is the safe way to touch just what you mean to touch.
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
Same JSON-input trap as every node in this pack: json_data is a text field expecting valid JSON, and malformed JSON gets dropped with a console warning while the request goes out with nothing in the body - a sure path to a 400. And remember the no-throw behavior: a network failure returns status_code = 0 with the error text in content, so always check the status before assuming your update landed.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| url | STRING | https://api.example.com/data/1 | — |
| content_type | COMBO | json | 3 options: json, form, raw |
| sessionopt | HTTP_SESSION | — | |
| authopt | HTTP_AUTH | — | |
| headersopt | STRING | {} | — |
| json_dataopt | STRING | {} | — |
| raw_dataopt | STRING | — | |
| timeoutopt | INT | 301–300 | — |
| verify_sslopt | BOOLEAN | true | — |
| allow_redirectsopt | BOOLEAN | true | — |
| cookiesopt | STRING | {} | — |
| proxy_urlopt | STRING | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| status_code | INT | — |
| headers | STRING | — |
| content | STRING | — |
| json | STRING | — |