jpbarrette | 12 Jan 2010 19:01
Picon

http://curlpp.org/index.php/api

On , Björn Andrist <bjorn.andrist-XJwpaWFpv1IwFerOooGFRg@public.gmane.org> wrote:
> Hi,
>
> I have problems accessing the API-page at curlpp.org. The link http://curlpp.org/index.php/api only shows the first page at curlpp.org.

Piotr, do you have any idea of what is causing the problem?

>
>
> Best regards,
> // Björn Andrist
>

--
You received this message because you are subscribed to the Google Groups "curlpp" group.
To post to this group, send email to curlpp-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to curlpp+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at http://groups.google.com/group/curlpp?hl=en.

duselbaer | 22 Jan 2010 11:31

[curlpp:182] Access optional response information (eg. Content-Type)

Hi there,

I'm using curl++ to create a client library for a service which speaks
HTTP.

If I try to access a header field which does not exist in my response
(eg. COntent-Type), curl_easy_getinfo signals this by returning a NULL
pointer.

But

  std::string ret = curlpp::infos::ContentType().get(curlRequest);

cannot return a NULL pointer :)

If a header field did not exist, it caused crashes because the
InfoTypeConverter<std::string> did not handle this case properly. I
fixed this by handeling the NULL pointer cause explicitely there

template<>
void
InfoTypeConverter<std::string>::get(curlpp::Easy & handle,
                      CURLINFO info,
                      std::string & value)
{
  char * tmp;
  InfoGetter::get(handle, info, tmp);
  if (tmp)
    value = tmp;
  else
    value.clear();
}

But I'm not sure if this is the right way. Is there any possibility to
check whether a header field exists or not?

Regards,

Ronny

--

-- 
You received this message because you are subscribed to the Google Groups "curlpp" group.
To post to this group, send email to curlpp@...
To unsubscribe from this group, send email to curlpp+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/curlpp?hl=en.

Brad Hubbard | 23 Jan 2010 01:35

Re: [curlpp:183] Access optional response information (eg. Content-Type)


duselbaer wrote:
> template<>
> void
> InfoTypeConverter<std::string>::get(curlpp::Easy & handle,
>                       CURLINFO info,
>                       std::string & value)
> {
>   char * tmp;
>   InfoGetter::get(handle, info, tmp);
>   if (tmp)
>     value = tmp;
>   else
>     value.clear();
> }
>
>
>   

Why is this a template function?

Cheers,
Brad

--

-- 
You received this message because you are subscribed to the Google Groups "curlpp" group.
To post to this group, send email to curlpp@...
To unsubscribe from this group, send email to curlpp+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/curlpp?hl=en.

Brad Hubbard | 23 Jan 2010 04:44

Re: [curlpp:184] Access optional response information (eg. Content-Type)


Brad Hubbard wrote:
> Why is this a template function?
>
> Cheers,
> Brad
>

Never mind, my bad.

Cheers,
Brad

--

-- 
You received this message because you are subscribed to the Google Groups "curlpp" group.
To post to this group, send email to curlpp@...
To unsubscribe from this group, send email to curlpp+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/curlpp?hl=en.

jdt141 | 25 Jan 2010 19:07
Picon
Gravatar

[curlpp:185] initialize() and terminate()

Hi All -

I'm just getting started with curlpp, so pardon my ignorance. I'm
currently working to develop a component framework, where I will have
multiple HttpComponent(s) in an application, communicating to multiple
HttpServer's. I'd like to use curlpp for this, but when I read the
documentation, it says that the initialize and terminate functions
should only be called once, or they will throw a logic_error.

Interestingly, I created a simple class HttpComponent where in the
ctor/dtor I'm calling either the initialize or terminate function as
appropriate. Interestingly, when I instantiate two objects, the
logic_error is not thrown. Is this normal behavior, or am I missing
something? By the way the code comments read, I will have to implement
my own reference counter to the total number of HttpComponents I
create, and only calling initialize() on the first instantiation and
terminate() on the last destruction, however, when I actually build
the code, that seems to not be the case.  Thoughts?  Using version
0.7.3... Thanks.

--

-- 
You received this message because you are subscribed to the Google Groups "curlpp" group.
To post to this group, send email to curlpp@...
To unsubscribe from this group, send email to curlpp+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/curlpp?hl=en.


Gmane