ComfyUI Node

HTTP PATCH Request

Send partial updates to APIs that want them

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

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) or raw. For JSON, put the partial payload in json_data; for raw, use raw_data. Unlike HTTPPost, there's no form or form-data mode 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.

CategoryHTTP/Methods

Inputs (12)

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

Outputs (4)

NameTypeDescription
status_codeINT
headersSTRING
contentSTRING
jsonSTRING