langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
51.96k stars 7.55k forks source link

Unable to use `Array[String]` in `HTTP Request` #9125

Open AprilNEA opened 1 month ago

AprilNEA commented 1 month ago

Self Checks

Dify version

Live

Cloud or Self Hosted

Cloud

Steps to reproduce

image image image

✔️ Expected Behavior

image

❌ Actual Behavior

image
AprilNEA commented 1 month ago

Workflow App: https://udify.app/workflow/UvtkopWluBtN4Ekw

dosubot[bot] commented 1 month ago

The issue you're encountering with the "Unexpected token" error is likely due to the use of single quotes in your JSON input. JSON requires double quotes for strings.

To resolve this, ensure that your JSON body in the HTTP request is formatted with double quotes, like this:

{
  "result": ["1", "2"]
}

Make sure your request body is correctly set up in the HTTP request configuration interface. If you're using a variable, ensure it outputs the JSON in the correct format with double quotes.

To continue talking to Dosu, mention @dosu.

AprilNEA commented 1 month ago

The issue you're encountering with the "Unexpected token" error is likely due to the use of single quotes in your JSON input. JSON requires double quotes for strings.

To resolve this, ensure that your JSON body in the HTTP request is formatted with double quotes, like this:

{
  "result": ["1", "2"]
}

Make sure your request body is correctly set up in the HTTP request configuration interface. If you're using a variable, ensure it outputs the JSON in the correct format with double quotes.

To continue talking to Dosu, mention @dosu.

@docu That's the crux of the problem, but obviously it's not in the user's control

crazywoola commented 1 month ago

This is a known issue, we plan to support it later.

dosubot[bot] commented 1 week ago

Hi, @AprilNEA. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.

Issue Summary:

Next Steps:

Thank you for your understanding and contribution!