2025-03-24 17:39:13 +08:00
2025-03-24 15:37:56 +08:00
2025-03-24 15:37:56 +08:00

ComfyUI-RequestNodes

中文版本

Introduction

ComfyUI-RequestNodes is a custom node plugin for ComfyUI that provides functionality for sending HTTP requests. Currently, it includes the following nodes:

  • Get Node: Sends GET requests and retrieves responses.
  • Post Node: Sends POST requests and retrieves responses.
  • Header Node: Manages HTTP request headers.
  • Key/Value Node: Creates key/value pairs for building request parameters or headers.

Test Resources

The plugin includes the following test resources:

  • base_flask_server.py - Python Flask server for testing
  • get_node.json - GET request workflow template
  • post_node.json - POST request workflow template

Installation

To install ComfyUI-RequestNodes, follow these steps:

  1. Open the ComfyUI custom_nodes directory.

    • In your ComfyUI installation directory, find the custom_nodes folder.
  2. Clone the ComfyUI-RequestNodes repository.

    • Open a terminal or command prompt in the custom_nodes directory.
    • Run the following command to clone the repository:
    git clone https://github.com/felixszeto/ComfyUI-RequestNodes.git
    
  3. Restart ComfyUI.

    • Close and restart ComfyUI to load the newly installed nodes.

Usage

After installation, you can find the "Get Node" and "Post Node" nodes under the "Request Nodes" category in the ComfyUI node list.

  • Get Node:

    • url: Enter the URL address you want to request.
    • json_array: Input JSON array generated by Key/Value Nodes as request parameters.
    • headers: Input request headers generated by Header Node.
    • output_format: Select the output format of the response, such as "text" or "json".
    • response: Output response content.
    • 2051bd17154dbb9ab4b203f955c873a
  • Header Node:

    • json_array: Input JSON array generated by Key/Value Nodes as request headers.
    • output: Output merged request headers.
  • Key/Value Node:

    • key: Input key name.
    • value: Input key value.
    • input_json: Optional, connect output from other Key/Value Nodes.
    • output: Output JSON array containing the key/value pair.
  • Post Node:

    • url: Enter the URL address you want to request.
    • data: Enter the data for the POST request, in JSON format.
      • In the data field, you can use placeholders like __str1__, __str2__, etc. in your JSON request body.
      • These placeholders will be replaced by the values of input strings str1, str2, etc. respectively.
      • For example, if you have an input string named str1 with the value "example", and your JSON data is {"key": "__str1__"}, the actual request body will be {"key": "example"}.
    • output_format: Select the output format of the response, such as "text" or "json".
    • response: Output response content.
    • 62c32f115bc6aaf8bdf454755275695

Contribution

Welcome to submit issues and pull requests to improve ComfyUI-RequestNodes!


Note:

  • Please ensure that your ComfyUI environment has Git installed correctly.
  • If your ComfyUI installation directory is not in the default location, please adjust the path according to your actual situation.
  • If you encounter any problems, please check the issue page of the GitHub repository or submit a new issue.
S
Description
No description provided
Readme
2.5 MiB
Languages
Python 100%