On 2012-06-23 04:47, oh...@cox.net wrote:
Hi,

Per earlier threads on this list, I've been working on an Apache module.  For 
the time being, I'm kind of stuck because of the problems that I've run into 
with trying to integrate my module with a 3rd party library, so just for my 
module, which is mainly a proof-of-concept, I'd like to have my module do an 
HTTP GET request.

So, I was wondering if anyone has some simple example code for doing that from 
within a module, maybe using libcurl, or just natively using sockets?

I'm trying to do this myself, and I've been looking at using libcurl, but most of the 
examples that I've seen use the "easy" setup, so if someone has something like 
that that can be shared, it'd be a big help.  Conversely, if I figure it out, I'll post 
some working snippets here :)...

I'll say the same thing as Ben, try with apache, either mod_proxy or ap_run_sub_request. That if you make one outgoing request per incoming request. If you want several outgoing requests, in parallel preferably, per incoming request, then go with some 3rd-party library.

I have some in-house C++ wrappers for libcurl (curl_multi_* + timeouts + client pools), but they are not straightforward to use, a lot of setup is involved, and they are not thoroughly tested.

S

Reply via email to