Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need expert HELP with manual HTTP POST request

Status
Not open for further replies.

111101101

Programmer
Oct 16, 2003
39
0
0
US
Okay, i need help. but first, you MUST be an expert with the HTTP protocol. Just a standard web developer wont understand what i am trying to do.

I am trying to find out how to "manually" send a string into a remote web server (via port 80) with the HTTP POST protocol. I have succeeded with the HTTP GET request, but cant seem to be able to send the correct character strings into the stream with POST. Like for GET, this is what i send....

GET /index.asp?name=hello HTTP/1.1\n
HOST: \n
\n

But what do i send for POST? I need to be able to send a list of QUERY_STRING along with it, like the name=hello name/value pair.

A return value of 200 OK is success. I did it for GET, now can somebody help me find out how to get it for POST?

Thanks.
755
 

> Just a standard web developer wont understand what i am trying to do

Then maybe you should try another forum, possibly one to do with the http protocol itself, not the data that is carried over it (web pages to you).

Sorry to have dissapointed you.

Dan
Standard Web Developer
 
I'm no expert, but it didn't take long to Google up some examples:
Looks like the answer to your question is something like
Code:
POST /index.asp HTTP/1.0
Accept */*
Content-type: application/x-[URL unfurl="true"]www-form-urlencoded[/URL]
Content-length: 10

name=hello

-- Chris Hunt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top