通过HTTP& amp;连接到服务器vc ++中的GET / POST方法 [英] connection to server via HTTP & GET/POST method in vc++

查看:96
本文介绍了通过HTTP& amp;连接到服务器vc ++中的GET / POST方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

这是我在vc ++中第一个关于套接字编程的应用程序。我正面临如何与服务器建立连接的问题。通过HTTP发出GET / POST请求



请帮助我。它的紧急......

谢谢

解决方案

rup写道:


您好,

这是我在vc ++中第一个关于套接字编程的应用程序。我正面临如何与服务器建立连接的问题。通过HTTP发出GET / POST请求



请帮助我。紧急....

谢谢



由于这是微软特有的问题,请尝试发帖到

comp.os.ms-windows.programming或其中一个microsoft。*组。另外

请参阅MSDN文档。


santosh说:


rup写道:


> Hello,
这是我在vc ++中第一个关于套接字编程的应用程序。我正面临着如何与服务器连接的问题,&通过HTTP发出GET / POST请求。
请帮助我。它的紧急......
谢谢



由于这是微软特有的问题,



我认为,他正在使用VC ++的事实不如他正在努力学习如何进行网络编程的事实那么重要。他最好的选择是

从Unix网络编程中学习套接字,并在Windows下使用它作为一个有价值的部分,需要进行小调整



学习经验。然后他可以从相关的RFC中了解HTTP。


尝试发帖到

comp.os.ms-windows.programming



我从来没有听说过这个组,我怀疑它不存在。你可能

的意思是comp.os.ms-windows.programmer.win32


< snip>


-

Richard Heathfield

Usenet是一个奇怪的地方 - dmr 29/7/1999
http://www.cpax.org.uk

电子邮件:rjh在上述域名中, - www。




Richard Heathfield< rj *@see.sig.invalidwrote in message

新闻:HY ********************* @ bt.com ...


santosh说:


rup写道:

< blockquote class =post_quotes>


Hello,

这是我在vc ++中第一个关于套接字编程的应用程序。我正面临如何与服务器建立连接的问题。通过HTTP发出GET / POST请求



请帮助我。紧急....

谢谢



由于这是微软特有的问题,



我认为,他正在使用VC ++的事实不如他正在尝试学习如何进行网络编程的事实那么重要。他最好的选择是





从Unix网络编程中了解套接字,小调整

让它在Windows下工作是

学习体验的重要组成部分。



别这么认为,伙计...


只是因为他认为他的问题与与...有关插座

编程&,他特意说他想做的是

与服务器连接,& GET / POST请求

HTTP"。


这又是一个老想法,有人问我怎么开车

到芝加哥?,你告诉他们学习如何施放引擎块......


然后他可以从相关的RFC中了解HTTP。 />



这将是一个明确的帮助,但这里是真正的答案:


1.转到MSDN网站 - 网站,特别是你应该尝试:
http://msdn.microsoft.com/library/de.../library/en-us

/wininet/wininet/portal.asp

2.下载wininet API(或其他等效的Microsoft

互联网客户端 - 服务器API)绝对免费

3.按照文档中的指示使用它(了解

HTTP在尝试解决时有点帮助

微软的互联网协议的特定API实现)


重要的是如果他只是想在互联网上写一个应用程序来获取/发布信息,那就不要浪费时间

重新发明套接字的冶金学;和HTTP协议,

,因为它已经为他完成了。


我必须给他的另一个重要警告是

要非常警惕许多开源。 goofball HTTP

非实现,感染了互联网上的角落和缝隙,垃圾无法正常工作,废话从来都不会。

工作,半潦草写的废话由迟到的非文件记录

,最终只是说,我们是一群迟到的人,有
不知道如何实现互联网协议,但在开源的慷慨精神中,我们会让你浪费时间尝试使用

工作。


我个人可以保证微软的东西,一旦你谜题,你就会知道如何使用它,工作,并且完美无缺地工作...... 。


我应该以主题性的精神指出,

wininet和其他Microsoft Internet API实际上是
C ++,并且必须由C ++编译器编译......


---

William Ernest Reid


Hello,
This is my first application on socket programming in vc++. I am facing
problem that how to make connection to server, & make GET/POST request
by HTTP.
Please help me. Its urgent....
Thanks

解决方案

rup wrote:

Hello,
This is my first application on socket programming in vc++. I am facing
problem that how to make connection to server, & make GET/POST request
by HTTP.
Please help me. Its urgent....
Thanks

Since this is a Microsoft specific question, try posting to
comp.os.ms-windows.programming or one of the microsoft.* groups. Also
see the MSDN documentation.


santosh said:

rup wrote:

>Hello,
This is my first application on socket programming in vc++. I am facing
problem that how to make connection to server, & make GET/POST request
by HTTP.
Please help me. Its urgent....
Thanks


Since this is a Microsoft specific question,

The fact that he''s using VC++ is less significant, I think, than the fact
that he''s trying to learn how to do network programming. His best bet is to
learn about sockets from "Unix Network Programming", with the minor tweaks
needed for getting it to work under Windows being a valuable part of the
learning experience. Then he can learn about HTTP from the relevant RFC.

try posting to
comp.os.ms-windows.programming

I''ve never heard of that group, and I suspect it doesn''t exist. You probably
mean comp.os.ms-windows.programmer.win32

<snip>

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.



Richard Heathfield <rj*@see.sig.invalidwrote in message
news:HY*********************@bt.com...

santosh said:

rup wrote:

Hello,
This is my first application on socket programming in vc++. I am facing
problem that how to make connection to server, & make GET/POST request
by HTTP.
Please help me. Its urgent....
Thanks

Since this is a Microsoft specific question,


The fact that he''s using VC++ is less significant, I think, than the fact
that he''s trying to learn how to do network programming. His best bet is

to

learn about sockets from "Unix Network Programming", with the minor tweaks
needed for getting it to work under Windows being a valuable part of the
learning experience.

Don''t think so, dude...

Just because he THINKS his problem has to do with "socket
programming", what he specifically said he wanted to do was
"make a connection to a server, & GET/POST request by
HTTP".

This again is the old idea of somebody asking "how do I drive
to Chicago?", you tell them to learn how to cast an engine block...

Then he can learn about HTTP from the relevant RFC.

This will be a definite help, but here''s the actual answer:

1. Go to the MSDN web-site, specifically you should try:
http://msdn.microsoft.com/library/de.../library/en-us
/wininet/wininet/portal.asp
2. Download the "wininet" API (or other equivalent Microsoft
Internet client-server API) for absolutely friggin'' free
3. Use it as directed in the documentation (a knowledge of
HTTP is somewhat helpful here when trying to puzzle out
Microsoft''s particular API implementation of Internet protocols)

The important thing is if he just wants to write an application that
GETs/POSTs information on the "Internet", that he not waste time
re-inventing the metallurgy of "sockets" and the HTTP protocols,
since it has already been done for him.

The other important warning I must give him is
to be very wary of the many "open source" goofball HTTP
non-implementations that infest the nooks and crannies of
the Internet, crap that doesn''t work, crap that never will
work, half-written crap written by retards with idiotic non-documentation
that ultimately just says, "We''re a bunch of retards who have
no idea how to implement Internet protocols but in the generous
spirit of ''open source'' we''ll let you waste your time trying to use
something that doesn''t work."

I can personally vouch that the Microsoft stuff, once you puzzle
out how to use it, works, and works flawlessly...

And I should probably point out, in the spirit of "topicness",
that "wininet" and other Microsoft Internet APIs actually are
C++, and MUST be compiled by a C++ compiler...

---
William Ernest Reid


这篇关于通过HTTP&amp; amp;连接到服务器vc ++中的GET / POST方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆