How to encode spaces in curl GET request URL on Linux?

The problem is like this: I would like to send a GET request using curl and the content has spaces, such as curl “ world” The space and the “world” will be left away if this command is executed directory on Linux. How to encode spaces in curl request URL? You can use the –date-urlencode […]

How to make curl request pass the Squid proxy?

I use curl to send requests to remote servers like following command. curl –date-urlencode “data=hello” However, it is blocked by the network proxy squid in some networks with message like (some info anonymized with “…”): ERROR The requested URL could not be retrieved POST /… HTTP/1.1 Proxy-Authorization: Basic … User-Agent: Mozilla/4.0 (compatible;) Host: … […]

How to fetch a webpage as a mobile browser with curl on Linux?

On Linux, how to download a webpage as a mobile browser? You can change the agent of curl to be a mobile browser’s and the remote webserver may be consider the request from a mobile browser: curl -A “Mozilla/5.0 (iPhone; CPU iPhone OS 6_1_3 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) CriOS/28.0.1500.12 Mobile/10B329 Safari/8536.25” […]