-
-
Save cvasilak/1d544b4093b6dc098267 to your computer and use it in GitHub Desktop.
curl redirect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ curl -u user:pass -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"key" : "value"}' -v -L -3 --post302 http://server.com/post | |
* About to connect() to server.com port 80 (#0) | |
* Trying server.com | |
* connected | |
* Connected to server.com (x.x.x.x) port 80 (#0) | |
* Server auth using Basic with user 'xxxxx' | |
> POST /post HTTP/1.1 | |
> Authorization: Basic XXXX | |
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8x zlib/1.2.5 | |
> Host: server.com | |
> Accept: application/json | |
> Content-type: application/json | |
> Content-Length: 29 | |
> | |
* upload completely sent off: 29 out of 29 bytes | |
< HTTP/1.1 302 Moved Temporarily | |
< Date: Wed, 21 Aug 2013 16:19:34 GMT | |
< Server: Apache-Coyote/1.1 | |
< Location: https://server.com | |
< Content-Length: 0 | |
< Content-Type: text/plain | |
< | |
* Connection #0 to host server.com left intact | |
* Issue another request to this URL: 'https://server.com' | |
* About to connect() to server.com port 443 (#1) | |
* Trying server.com.... | |
* connected | |
* Connected to server.com (x.x.x.x) port 443 (#1) | |
* SSLv3, TLS handshake, Client hello (1): | |
* SSLv3, TLS handshake, Server hello (2): | |
* SSLv3, TLS handshake, CERT (11): | |
* SSLv3, TLS handshake, Server key exchange (12): | |
* SSLv3, TLS handshake, Server finished (14): | |
* SSLv3, TLS handshake, Client key exchange (16): | |
* SSLv3, TLS change cipher, Client hello (1): | |
* SSLv3, TLS handshake, Finished (20): | |
* SSLv3, TLS change cipher, Client hello (1): | |
* SSLv3, TLS handshake, Finished (20): | |
* SSL connection using DHE-RSA-AES256-SHA | |
* Server certificate: | |
* subject: serialNumber=XXXX; C=US; XXX | |
* start date: 2013-02-02 19:15:37 GMT | |
* expire date: 2015-05-08 01:49:13 GMT | |
* subjectAltName: server.com matched | |
* issuer: C=US; O=GeoTrust, Inc.; CN=GeoTrust SSL CA | |
* SSL certificate verify ok. | |
* Server auth using Basic with user 'user' | |
> POST /post HTTP/1.1 | |
> Authorization: Basic XXXX== | |
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8x zlib/1.2.5 | |
> Host: server.com | |
> Accept: application/json | |
> Content-type: application/json | |
> Content-Length: 29 | |
> | |
* upload completely sent off: 29 out of 29 bytes | |
< HTTP/1.1 200 OK | |
< Date: Wed, 21 Aug 2013 16:19:34 GMT | |
< Server: Apache-Coyote/1.1 | |
< Access-Control-Allow-Credentials: true | |
< Content-Type: application/json | |
< Vary: Accept-Encoding | |
< Transfer-Encoding: chunked | |
< | |
* Connection #1 to host server.com left intact | |
{"response":"value"}* Closing connection #0 | |
* Closing connection #1 | |
* SSLv3, TLS alert, Client hello (1): |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment