Tag archive for: HTTP

Downloading a file via HTTP post and HTTP get in C#

Previously, I had written two posts on how to upload files to a web server, one for the case when the size of the HTTP request is small, and the other for the case when the size of the HTTP request is large. How about the downloading of files from a web server? In this post, I shall discuss how to download files from a HTTP server via the System.Net.HttpWebRequest class.

Uploading large HTTP multipart request with System.Net.HttpWebRequest in C#

My previous post described a method of sending a file and some data via HTTP multipart post by constructing the HTTP request with the System.IO.MemoryStream class before writing the contents to the System.Net.HttpWebRequest class. This method of sending our HTTP request will work only if we can restrict the total size of our file and data.

Sending a file and some form data via HTTP post in C#

A few weeks back, I wrote some logic to send a file and a from a windows client over to a Java server endpoint. There are a few ways to do that: via application protocols like FTP and HTTP or even implementing a custom protocol using TCP/IP. Since the Java server was already serving HTTP requests and that HTTP requests can usually get through firewalls quite easily, I chose the HTTP protocol.