[Gtk-sharp-list] Newbee: How to perform a HttpRequest from a GTK# app?
andy at brdstudio.net
Fri May 14 06:35:00 EDT 2010
Does RESTful Service = Web Service? I can't keep all the abbreviations
straight. Consuming a web service is identical to how you would do it
with Windows.Forms. Here is an article that should set you in the right
Here is a simple article on the subject:
Last and probably least a simple stupid read/write, this should work but
it was just slapped together quickly so your going to want to check it over.
bool blnEndOfFile = false;
HttpWebRequest wr =
HttpWebResponse wsp = (HttpWebResponse)wr.GetResponse();
System.IO.Stream s = wsp.GetResponseStream();
FileStream fs = new FileStream("C:\Users\UserName\Downloads",
long lgFileProgress = 0;
byte b = new byte;
int n = s.Read(b, 0, b.Length);
if (n > 0)
fs.Write(b, 0, n);
blnEndOfFile = true;
I hope this helps.
On 5/14/2010 1:18 AM, cambiata wrote:
> RESTful service
More information about the Gtk-sharp-list