LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-10-2005, 09:26 AM   #1
gjagadish
Member
 
Registered: Oct 2005
Location: India
Distribution: Fedora Core
Posts: 88

Rep: Reputation: 15
Question Http Client in C++


Hi guys,

i want to write a simple http client that should query some data and post some data. For Example, i want login into yahoomail with my account in C++ under Linux

I know some network programming and i know socket programming.

But i don't the query format or http concept.

can anyone pls guide or provide some web links to write my program.

thanks in advance

Jagadish
 
Old 10-10-2005, 03:09 PM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
First port of call should probably be www.freshmeat.net or www.source; you'll probably find a library that does what you want already.

If not, you'll find everything you need to know on HTTP at www.rfc-editor.org (search for “HTTP”).

Good luck!
 
Old 10-10-2005, 03:47 PM   #3
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
I agree...start with the http rfc:
http://www.faqs.org/rfcs/rfc2616.html
 
Old 10-11-2005, 06:06 AM   #4
gjagadish
Member
 
Registered: Oct 2005
Location: India
Distribution: Fedora Core
Posts: 88

Original Poster
Rep: Reputation: 15
Hi,

I read the RFC for HTTP and got some information about GET, POST etc.
But still it seems like confusing me.

I wrote a client socket and connected it with yahoo server.

It gave some response. But after that i don't know what to do.

How to post the data and password in C++.

can u please provide me some examples to understand this????????

thanx
Jagadish
 
Old 10-11-2005, 11:58 AM   #5
mrcheeks
Senior Member
 
Registered: Mar 2004
Location: far enough
Distribution: OS X 10.6.7
Posts: 1,690

Rep: Reputation: 52
Try to:
- locate the authentication mecanism in the rfc library if there is one
- authenticate yourself
- post the date with the POST methods or objects available.

read a little bit more documentation on the rfc library :
- available protocols
- available objects and methods and their use
 
Old 10-12-2005, 03:48 PM   #6
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
Also, try connecting to an un-authenticated HTTP server first. That will give you a feel for how the basic GET/POST instructions work.

Most authentication protocols use additional fields in the header (such as in cookie information).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to write a simple http client suguanqun Programming 2 11-03-2005 11:57 PM
client cannot connect to server via http helpme0904 Linux - Newbie 7 07-07-2005 08:58 AM
http client c++ PROBLEM picassoo Programming 1 06-12-2005 02:06 AM
Iptables-Client http-access only for few domains dnla Linux - Newbie 0 09-25-2003 05:05 AM
HTTP Email Client chrisk5527 Linux - Software 1 07-23-2003 11:33 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration