Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error http request to backend demo server #1163

Open
haditabealhojeh opened this issue Sep 26, 2024 · 1 comment
Open

Error http request to backend demo server #1163

haditabealhojeh opened this issue Sep 26, 2024 · 1 comment

Comments

@haditabealhojeh
Copy link

haditabealhojeh commented Sep 26, 2024

Hi. when I sewn below http request, I got
{"code":2,"error":"Invalid JSON object in request, please add vehicles and jobs or shipments to the object body"}

my command (according to link)
curl --header "Content-Type:application/json" --data '{"vehicles":[{"id":0,"start":[2.3526,48.8604],"end":[2.3526,48.8604]}],"jobs":[{"id":0,"location":[2.3691,48.8532]},{"id":1,"location":[2.2911,48.8566]}]}' http://solver.vroom-project.org

I also have installed Vroom on my server and I got the same error.

@jcoupey
Copy link
Collaborator

jcoupey commented Sep 26, 2024

This error appears when there is a json error in the payload. The weird thing is that the exact same command works from my terminal. Can you maybe try putting the data in an input.json file and instead run:

curl --header "Content-Type:application/json" --data @input.json http://solver.vroom-project.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants