On Thu, Dec 30, 2010 at 11:24 AM, Daniel Stenberg <[email protected]> wrote:
> On Thu, 30 Dec 2010, amit paliwal wrote: > > By providing readcb, will I be able to send GET with my custom data??? >>> >>> http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTREADFUNCTION >>> >> >> I have seen this documentation and wrote sample code by this only, but I >> don't know somehow my readcb is not getting called. I added one printf() >> statement just to check whether readcb is called or not, but it never >> happens. Whenevr we do curl_easy_perform() will it be sending a GET message >> to Server? I have observed that some GET request goes to my test server. I >> am sure I am missing something and need help from you to fix it. >> > > You can either do it like a POST (and change the method to GET) > http://curl.haxx.se/libcurl/c/post-callback.html > > ... or you can do it like a PUT (and change the method to GET) > http://curl.haxx.se/libcurl/c/httpput.html > > Reply: I will try to do it this way, in the mean time just one query, when we say curl_easy_perform() for the first time, it will connect to the Server and then it will fetch the URL of server (as we set option CURLOPT_URL and Server is expected to reply for this. Is there a time gap between the connection establishment and sending of CURLOPT_URL or is it like: 1) Once the server get the new connection request,it will accept() it and make a new socket fd. 2) After this curl will send request to fetch URL and will wait for the response?? Or steps 1 and 2 are combined in a single step from curl's point of view? > > -- > > / daniel.haxx.se > ------------------------------------------------------------------- > List admin: http://cool.haxx.se/list/listinfo/curl-library > Etiquette: http://curl.haxx.se/mail/etiquette.html >
------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
