dify icon indicating copy to clipboard operation
dify copied to clipboard

The HTTP request node failed to send form-data parameters

Open leoterry-ulrica opened this issue 2 years ago • 9 comments

Self Checks

  • [X] This is only for bug report, if you would like to ask a question, please head to Discussions.
  • [X] I have searched for existing issues search for existing issues, including closed ones.
  • [X] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [X] Please do not modify this template :) and fill in all the required fields.

Dify version

0.11.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

1、workflow http request node 1730879786022

2、unable to send form-data parameters to the interface 1730879729032 1730882260083

3、postman request form-data success 1730879896529

✔️ Expected Behavior

hope to be able to send form-data parameters. 1730879896529

❌ Actual Behavior

No response

leoterry-ulrica avatar Nov 06 '24 07:11 leoterry-ulrica

Additional note, the 0.7.0 version can successfully send form-data parameters.

leoterry-ulrica avatar Nov 06 '24 08:11 leoterry-ulrica

Check the sandbox and squid configuration, to see if this host is allowed to be accessed.

crazywoola avatar Nov 06 '24 08:11 crazywoola

I couldn't find specific information about issues related to form-data handling in Dify version 0.11.0. However, there are some similar discussions and issues that might be relevant:

  1. There are two similar unsolved discussions:

  2. A closed issue related to the HTTP node in chat workflow:

For your specific issue with form-data parameters not being sent, ensure that the configuration of the HTTP request node is correct, particularly the body type set to "form-data" and that all key-value pairs are correctly defined. If the issue persists, it might be helpful to compare the configuration between versions 0.7.0 and 0.11.0 to identify any changes that could affect form-data handling.

To continue talking to Dosu, mention @dosu.

dosubot[bot] avatar Nov 06 '24 08:11 dosubot[bot]

Check the sandbox and squid configuration, to see if this host is allowed to be accessed.

Don’t close it so early, please make sure you understand the issue clearly first.

1730880225792

1730880182781

leoterry-ulrica avatar Nov 06 '24 08:11 leoterry-ulrica

@JohnJyong Your colleague closed this issue too quickly without fully understanding the problem. I reported this issue to your relevant colleague via WeChat yesterday, and they guessed it might be a sandbox problem. I have checked the code of dify and it should not be a sandbox issue, but rather a problem with the code in api/core/workflow/nodes/http_request/executor.py. Could you please check the code for the bug?

leoterry-ulrica avatar Nov 06 '24 08:11 leoterry-ulrica

I've got similar issue with 0.11 's HTTP node, configured as image The same configuration is well working with 0.9.2. But in 0.11, API received error messages from HTTP node.

I noticed post request format changed with 0.11, suppose to be the problem. see attachment below: blue 0.11 vs red circle 0.9.2 9c854786717dda88a70badbd9368ee4

MWang-TS avatar Nov 07 '24 11:11 MWang-TS

I've got similar issue with 0.11 's HTTP node, configured as image The same configuration is well working with 0.9.2. But in 0.11, API received error messages from HTTP node.

I noticed post request format changed with 0.11, suppose to be the problem. see attachment below: blue 0.11 vs red circle 0.9.2 9c854786717dda88a70badbd9368ee4

It might be a bug; the official developers are already looking into it.

leoterry-ulrica avatar Nov 07 '24 11:11 leoterry-ulrica

There is still a problem. 1731053005997

@crazywoola

leoterry-ulrica avatar Nov 08 '24 08:11 leoterry-ulrica

I had that problem too. Dify didn't send form-data body via third-party API. When I upgraded to the latest version (v0.11.1), the bug's still there.

image

tridvm avatar Nov 15 '24 08:11 tridvm