Flask only sees first parameter from multiple parameters sent with curl

前端 未结 1 1014
清歌不尽
清歌不尽 2021-02-14 10:17

I am using curl to make a request to a Flask route that expects multiple query params. However, the log shows only the first param in the url, and Flask doesn\'t see the second

相关标签:
1条回答
  • 2021-02-14 11:05

    See Bidhan's comment here. I was using curl without putting my URL inside double quotes.

    To quote:

    If you're using curl then you need to pass the url inside of quotes. It should look like curl "localhost:5000/path?param1=1&param2=2" . In the shell, & is used for forking processes and doesn't behave like you would expect it to. – Bidhan A

    0 讨论(0)
提交回复
热议问题