cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Multi Interface - How to know the URL for which request is completed

From: puneet sharma <p.sharma83_at_gmail.com>
Date: Thu, 21 May 2009 18:47:13 -0700

On Thu, May 21, 2009 at 6:10 PM, Jeff Pohlmeyer <yetanothergeek_at_gmail.com>wrote:

> On May 21, 2009, puneet sharma wrote:
>
> > I am trying to use libcurl via multi interface. I am able to implement
> the
> > handling till the point where i come to know that one of my requests is
> > complete (via curl_multi_info_read).
>
> > I get the easy_handle for the request. However, i want to know the URL
> which
> > was set for the handle. Is there a way to do that ?
>
> If you want to know the URL that libcurl finally ended up at,
> (after any redirects) you can use curl_easy_getinfo() with the
> CURLINFO_EFFECTIVE_URL option. If you actually need to know
> the original URL that you passed to libcurl, you can associate
> that information with the easy handle using curl_easy_setopt()
> with CURLOPT_PRIVATE, and then retrieve the pointer later
> with curl_easy_getinfo() and CURLINFO_PRIVATE.
>
> - Jeff
>

Thanks Jeff. That resolved my issue !
-Puneet
Received on 2009-05-22