Why is curl truncating this query string?

后端 未结 2 1234
天涯浪人
天涯浪人 2020-11-30 04:12

I\'m sure the answer to this is going to be some painfully obvious character encoding issue...

I\'m using curl on the command line to test some endpoints in a python

2条回答
  •  爱一瞬间的悲伤
    2020-11-30 05:08

    The answer to the question, "what am I doing wrong," is that the shell sees the ampersand (&) and thinks that's the end of the command (and puts it into the background). You need to quote it, which is why the answers that quoted the string work. You could just as easily run this:

    curl -v -L "http://localhost:5000/pulse?lat=41.225&lon=-73.1"
    

提交回复
热议问题