45b26dc515fa1ffd5a535cb8a7aad637cf2abb4a
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 testingget_node.json- GET request workflow templatepost_node.json- POST request workflow template
Installation
To install ComfyUI-RequestNodes, follow these steps:
-
Open the ComfyUI custom_nodes directory.
- In your ComfyUI installation directory, find the
custom_nodesfolder.
- In your ComfyUI installation directory, find the
-
Clone the ComfyUI-RequestNodes repository.
- Open a terminal or command prompt in the
custom_nodesdirectory. - Run the following command to clone the repository:
git clone https://github.com/felixszeto/ComfyUI-RequestNodes.git - Open a terminal or command prompt in the
-
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.
-
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
datafield, 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
str1with the value "example", and your JSON data is{"key": "__str1__"}, the actual request body will be{"key": "example"}.
- In the
- output_format: Select the output format of the response, such as "text" or "json".
- response: Output response content.
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.
Languages
Python
100%