informatica:linux:curl
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
informatica:linux:curl [2011/03/14 11:36] – 83.247.136.12 | informatica:linux:curl [2020/05/29 16:47] (current) – removed jose | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Post de un fichero ====== | ||
- | En la web de validación de catcert subimos un certificado para validarlo: | ||
- | http:// | ||
- | |||
- | Exportamos nuestro certificado a un fichero certificado.txt. La petición es: | ||
- | curl -F " | ||
- | |||
- | Sacamos el nombre de la variable de **Content-Disposition** y el tipo de fichero de **Content-Type**: | ||
- | **Content-Disposition**: | ||
- | **Content-Type**: | ||
- | |||
- | Toda la petición con live http-headers es: | ||
- | < | ||
- | http:// | ||
- | |||
- | |||
- | |||
- | POST / | ||
- | |||
- | Host: testvalidacio.catcert.cat | ||
- | |||
- | User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; es-ES; rv: | ||
- | |||
- | Accept: text/ | ||
- | |||
- | Accept-Language: | ||
- | |||
- | Accept-Encoding: | ||
- | |||
- | Accept-Charset: | ||
- | |||
- | Keep-Alive: 115 | ||
- | |||
- | Connection: keep-alive | ||
- | |||
- | Referer: http:// | ||
- | |||
- | Cookie: JSESSIONID=FF1FA7290A9763D5666EAA41F28BCC96.app-linux3; | ||
- | |||
- | Content-Type: | ||
- | |||
- | Content-Length: | ||
- | |||
- | -----------------------------19885389925490671952116794076 | ||
- | |||
- | Content-Disposition: | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | -----------------------------19885389925490671952116794076 | ||
- | |||
- | Content-Disposition: | ||
- | |||
- | Content-Type: | ||
- | |||
- | |||
- | |||
- | -----BEGIN CERTIFICATE----- | ||
- | |||
- | MIIFQDCCBKmgAwIBAgIEPL7q0TANBgkqhkiG9w0BAQUFADA2MQswCQYDVQQGEwJF | ||
- | |||
- | nl5zfYDAJMWIE8hALMzH1DkSHW1UCbL1kVUNZQNhLmzqohsi1jIFTu691hkSJ/ | ||
- | |||
- | qYf91A== | ||
- | |||
- | -----END CERTIFICATE----- | ||
- | |||
- | |||
- | |||
- | -----------------------------19885389925490671952116794076-- | ||
- | |||
- | |||
- | |||
- | HTTP/1.1 200 OK | ||
- | |||
- | Date: Mon, 14 Mar 2011 10:38:53 GMT | ||
- | |||
- | Content-Type: | ||
- | |||
- | Content-Length: | ||
- | |||
- | Connection: Keep-Alive | ||
- | |||
- | ---------------------------------------------------------- | ||
- | </ | ||
- | |||
- | ====== Con Proxy ====== | ||
- | curl -x proxy: | ||