cURL / Mailing Lists / curl-library / Single Mail

curl-library

405 yet not resolved

From: Chirag <chirag_at_cellcloud.com>
Date: Wed, 26 Jun 2002 19:37:34 +0530

Hi,

  I have given the following options in Curl C API (Linux)

 curl_easy_setopt(curl, CURLOPT_URL, url);
 curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE);
 curl_easy_setopt(curl, CURLOPT_HEADER, TRUE);
 curl_easy_setopt(curl, CURLOPT_HTTPGET, TRUE);
 res = curl_easy_perform(curl);

I get the following output......

* Connected to www.xyz.com (202.71.XXX.XXX)
HEAD / HTTP/1.1
Host: www.xyz.com:4482
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*

HTTP/1.1 405 Method not allowed. Please send your request either by GET or POST method
Date: 20020626191433218
Content-Type: text/plain
Content-Length: 77

* Connection #0 left intact

* Closing connection #0
----------------------------------------------------------------------

Now how do I specify a GET Method for curl_perform() on the URL of the form http://www.xyz.com?name1=value1&name2=value2
Shouldnt CURLOPT_HTTPGET serve the purpose and get the URL contents without giving 405 error ?
However when I submit the same URL to the browser directly, I get my contents. Only when I try to submit the URL using CURL API, i get the above error.

Please help.

Chirag

-------------------------------------------------------
This sf.net email is sponsored by: Jabber Inc.
Don't miss the IM event of the season | Special offer for OSDN members!
JabConf 2002, Aug. 20-22, Keystone, CO http://www.jabberconf.com/osdn
Received on 2002-06-26