Recently do group purchase related services, using Linux under the Curl command to request the purchase of XML information, today in the use of Curl access to a link when a very strange phenomenon, the request of the url:http://api.union.meituan.com/data/ Api?city=%e5%8c%97%e4%ba%ac&limit=10&key=xxxxx&sort=1
The printed content looks like this:
See here a bit Meng, the good URL was truncated.
Finally found the reason on Google:& in the shell script has a special meaning (run in daemon) so as long as the & before the addition of backslash \ escape on the OK.
As follows:
Http://api.union.meituan.com/data/api?city=%e5%8c%97%e4%ba%ac\&limit=10\&key=xxxxx\&sort=1
Re-access on the normal output of the content.
Here is a solution to multiple parameters for get requests, about Curl POST request parameter questions can refer to this article:Curl website Development Guide