Reputation: 1335
I am sending the curl syntax like below format to get the authorization code value
D:\>curl -k "https://login.mailchimp.com/oauth2/authorize-post" -H "Host: login.mailchimp.com" -H "User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0" -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" -H "Accept-Language: en-US,en;q=0.5" -H "Accept-Encoding: gzip, deflate" -H "Referer: https://www.httpsnow.org/?code=fa4b17caac5cdef9d6a88250d320a9b5" -H "Content-Type: text/plain; charset=UTF-8" -H "Origin: https://www.httpsnow.org" -H "Connection: keep-alive" -H "Pragma: no-cache" -H "Cache-Control: no-cache" --data "username=mailchims&password=Mailchimp"%"403"
curl: (6) Could not resolve host: login.mailchimp.com
D:\>curl -k "https://login.mailchimp.com/oauth2/authorize-post" -H "Host: login.mailchimp.com" -H "User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0" -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" -H "Accept-Language: en-US,en;q=0.5" -H "Accept-Encoding: gzip, deflate" -H "Referer: https://www.httpsnow.org/?code=fa4b17caac5cdef9d6a88250d320a9b5" -H "Content-Type: text/plain; charset=UTF-8" -H "Origin: https://www.httpsnow.org" -H "Connection: keep-alive" -H "Pragma: no-cache" -H "Cache-Control: no-cache" --data "username=mailchims&password=Mailchimp"%"403"
▼ ♥☻ ♥ D:>
How to avoid special characters when getting result set? In above output you can see the love symbol at the bottom. Correct my sysntax if i am doing wrong please
Upvotes: 0
Views: 2805
Reputation: 3913
It seems that the result is a gzip and hence you see the special characters. You could save it in a file and use the silent settings to disable anything in the screen.
Append the following to the curl command line that you have l:
-o [filename] --silent
Replace [filename] with the name of the file to save the response to.
Upvotes: 0
Reputation: 1
curl --compressed
--compressed (HTTP) Request a compressed response using one of the algorithms libcurl supports, and save the uncompressed document. If this option is used and the server sends an unsupported encoding, curl will report an error.
How to properly handle a gzipped page when using curl?
Upvotes: 1