473,394 Members | 1,887 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

HTTP Post request

Hello,

I want to send a HTTP post request. The url will be given in the format

http://host:port/remainder-of-URL
where
host is the DNS name or IP address of the host where the receiver is
listening for incoming HTTP connections.

port is the TCP port on which the receiver is listening for incoming HTTP
connections. The port and the preceding colon character may be omitted, in
which case the port defaults to 80.

remainder-of-URL is the URL to which an HTTP POST operation will be directed.

I also need to send the request with some XML conten as a payload.

How to do this in C#
Nov 17 '05 #1
2 3765
Have a look at the WebClient class

"sushi" <su***@discussions.microsoft.com> wrote in message
news:1A**********************************@microsof t.com...
Hello,

I want to send a HTTP post request. The url will be given in the format

http://host:port/remainder-of-URL
where
host is the DNS name or IP address of the host where the receiver is
listening for incoming HTTP connections.

port is the TCP port on which the receiver is listening for incoming HTTP
connections. The port and the preceding colon character may be omitted, in which case the port defaults to 80.

remainder-of-URL is the URL to which an HTTP POST operation will be directed.
I also need to send the request with some XML conten as a payload.

How to do this in C#

Nov 17 '05 #2
Hello Sushi,
http://host:port/remainder-of-URL
yep... that's HTTP. All post requests use this format. The standard is
documented at www.w3c.org

Here's the place to start:
http://msdn.microsoft.com/library/en...classtopic.asp

Here are some other useful links
http://www.developerfusion.com/show/4637/
http://aspnet.4guysfromrolla.com/articles/122204-1.aspx
http://www.developersdex.com/xml/mes...1123&r=3988182
--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"sushi" <su***@discussions.microsoft.com> wrote in message
news:1A**********************************@microsof t.com... Hello,

I want to send a HTTP post request. The url will be given in the format

http://host:port/remainder-of-URL
where
host is the DNS name or IP address of the host where the receiver is
listening for incoming HTTP connections.

port is the TCP port on which the receiver is listening for incoming HTTP
connections. The port and the preceding colon character may be omitted,
in
which case the port defaults to 80.

remainder-of-URL is the URL to which an HTTP POST operation will be
directed.

I also need to send the request with some XML conten as a payload.

How to do this in C#

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: turnit \(removethis\) | last post by:
I have a login form that uses the post method to carry the information to the next page. The form works just fine in ie6.0, but fails in mozilla and fails in ie5.2 on a mac. "HTTP/1.1 400 Bad...
3
by: Ron Slosberg | last post by:
Hi, I am trying to download a file from a web page in code. I cannot use the System.Net.WebClient DownloadFile method because in order to get the file i must POST a request with form fields. Took...
7
by: Dodger | last post by:
Apologies if the is the wrong NG. But I have trapped a GET issued by a webpage on a button press and I would like to issue the GET programatically as-and-when I wish. I wondered what the text...
3
by: superseed | last post by:
Hi, I'm currently coding in C# a class to control a PTZ (Pan Tilt Zoom) Camera. To control the camera I have to send request on a CGI on it. Something like this : ...
3
by: Paul M | last post by:
Hi Sorry if this is posted in the wrong group but I'm brand new to this area. Basically I've got to post some XML documents to an external server using HTTP web request (POST, not GET) and be able...
0
by: WIWA | last post by:
Hi, I want to login to a password protected website and fetch the content of the page behind. I have based my code on http://weblogs.asp.net/jdennany/archive/2005/04/23/403971.aspx. When I use...
3
by: Patrick Fogarty | last post by:
I am programming what is to be a web service client that will use an HTTP-POST to request and retrieve data. The remote server (written in java for what it's worth) requires basic authentication...
5
by: David Lozzi | last post by:
Howdy, I wrote a web service in .Net for my customer. My customer has another vendor who now has to consume it but they are not using Visual Studio. Most of their pages are jsp, and they said...
2
by: MDANH2002 | last post by:
Hi From VB.NET I want to simulate the POST request of the following HTML form <html> <title>HTTP Post Testing</title> <body> <form action=http://www.example.com/postdata ...
0
by: shlim | last post by:
Currently I'm using VB.Net to perform a http/https multipart form post to a servlet. I'm able to perform the post using HttpWebrequest via GetRequestStream(). However, the servlet returned me with...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.