Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

My apache2 module written in c++ works just fine, it handles "page.xyz"-like requests from browser clients, and it can return the appropriate result.

What I need now is to use my module as a client to another server: make a HTTP (GET) request and get the response (GET https://graph.facebook.com/oauth/access_token?...).

Does apache has a magic can do this, or do I have to deal with sockets and make HTTP packets manually? What is the best way to do this?

Many thanks!

share|improve this question

1 Answer

up vote 0 down vote accepted

I am guessing you are on your own with the HTTP client. Probably the easiest way to make an HTTP connection is to use libcurl. On linux it should be installable from your distro's repositories.

share|improve this answer
Curl works well. I'm working on windows, but trying to write portable code. I was surprised when it linked even "CreateCompatibleDC" (!? :-) ), then I had some troubles with certificates, but finally curl seems to be a good solution and handles redirects and https well. Sry I can't you rank up, have no reputation. – Graphyt Jul 17 at 14:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.