curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: show the URL in the error message?

From: Dan Fandrich via curl-users <curl-users_at_cool.haxx.se>
Date: Mon, 16 Nov 2020 10:28:39 -0800

On Mon, Nov 16, 2020 at 06:14:25PM +0000, Jeremy Nicoll via curl-users wrote:
> On Mon, 16 Nov 2020, at 17:53, Dan Fandrich via curl-users wrote:
> > On Mon, Nov 16, 2020 at 12:14:40PM +0000, Jeremy Nicoll via curl-users wrote:
> > > On Mon, 16 Nov 2020, at 02:37, Dan Fandrich via curl-users wrote:
> > > > There are ways that most applications can get more
> > > > fine-grained data (e.g., one of the 99 different error codes, one
> > > > of the 27 different callback functions or one of the 66 different CURLINFO
> > > > values).
> > >
> > > And which of those will contain the error URL?
> >
> > CURLINFO_EFFECTIVE_URL a.k.a. --write-out %{url_effective}
>
> A callback? How does one get at that from curl issued at the commandline?

That one isn't a callback; it's available by adding "--write-out
%{url_effective}" to the command-line in a script. A callback is only relevant
within applications that might otherwise need to parse debug logs to obtain
transfer information.

Dan
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-11-16