Skip to content
Chris Petersen edited this page Sep 11, 2015 · 2 revisions

Performs a POST method on the url, returning 0 on success.

Parameter Description
url url to POST
header header string

Example

> (curl-data)
#f
> (curl-GET "http://google.com" "")
0
> (curl-data)
"<HTML><HEAD><meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\">\n<TITLE>302 Moved</TITLE></HEAD><BODY>\n<H1>302 Moved</H1>\nThe document has moved\n<A HREF=\"http://www.google.ca/?gfe_rd=cr&amp;ei=FRzzVcOwEvPs8wfgpJzoCg\">here</A>.\r\n</BODY></HTML>\r\n"
> (curl-POST "http://127.0.0.1/cgi-bin/cgitest/test?a=1&b=2" "")
0
> (curl-data)
"CGI test\nPATH_INFO=/test\nGET_VARS=()\nPOST_VARS=((a 1) (b 2))\nCOOKIES=()\n\n"
Clone this wiki locally