Blog

PETICIONES GET:

Con JSON:

curl -i -H "Accept: application/json" -H "Content-Type: application/json" http://hostname/resource

Con  XML:

curl -H "Accept: application/xml" -H "Content-Type: application/xml" -X GET http://hostname/resource

 

PETICIONES POST

Para POST de parámetros

curl --data "param1=value1&param2=value2" http://hostname/resource

 

Para subida de ficheros:

curl --form "fileupload=@filename.txt" http://hostname/resource

 

RESTful HTTP Post:

curl -X POST -d @filename http://hostname/resource


Para loggear en una web (auth)

curl -d "username=admin&password=admin&submit=Login" --dump-header headers http://localhost/Login

curl -L -b headers http://localhost/

Publicado en Servidores

PETICIONES GET:

Con JSON:

curl -i -H "Accept: application/json" -H "Content-Type: application/json" http://hostname/resource

Con  XML:

curl -H "Accept: application/xml" -H "Content-Type: application/xml" -X GET http://hostname/resource

 

PETICIONES POST

Para POST de parámetros

curl --data "param1=value1&param2=value2" http://hostname/resource

 

Para subida de ficheros:

curl --form "fileupload=@filename.txt" http://hostname/resource

 

RESTful HTTP Post:

curl -X POST -d @filename http://hostname/resource


Para loggear en una web (auth)

curl -d "username=admin&password=admin&submit=Login" --dump-header headers http://localhost/Login

curl -L -b headers http://localhost/

Publicado en Servidores

Sobre CNERIS

CNERIS es una empresa constituida por jóvenes emprendedores procedentes de diferentes sectores del mundo de la información. Nuestro equipo está compuesto por programadores, administradores de sistemas, administradores de base de datos, diseñadores gráficos, maquetadores,