API Request component does not send body payload when connected to a data node
Bug Description
When sending data from a payload into the API Request component via a data node, the component does not process or forward the payload. Instead, the request body is sent as empty. This happens both when directly connecting another component to the Body field of the API Request and when the API Request is triggered as a tool from an Agent.
Reproduction
- Create a blank flow:
- Add a Load JSON component with a JSON string.
- Connect the Data output of Load JSON to the Body field of the API Request component.
- onfigure the API Request to POST to a test endpoint such as https://httpbin.org/post
-
Run the API Request component.
-
Observe the response.
Or, test it using the attached flow: API Request tests.json
Expected behavior
The body of the API request should contain the payload passed through the data node and be correctly forwarded to the target endpoint.
Who can help?
No response
Operating System
Windows 11
Langflow Version
1.5.0.dev39
Python Version
None
Screenshot
No response
Flow File
No response
Fix merged into main via https://github.com/langflow-ai/langflow/pull/9644.