tango.net.http.HttpPost

License:
BSD style:

Version:
Initial release: January 2006

author:
Kris

class HttpPost: tango.net.http.HttpClient.HttpClient;
Supports the basic needs of a client sending POST requests to a HTTP server. The following is a usage example:

// open a web-page for posting (see HttpGet for simple reading)
auto post = new HttpPost ("http://yourhost/yourpath");

// send, retrieve and display response
Cout (cast(char[]) post.write("posted data", "text/plain"));


this(const(char)[] url);
Create a client for the given URL. The argument should be fully qualified with an "http:" or "https:" scheme, or an explicit port should be provided.

this(Uri uri);
Create a client with the provided Uri instance. The Uri should be fully qualified with an "http:" or "https:" scheme, or an explicit port should be provided.

void[] write();
Send query params only

void[] write(Pump pump);
Send raw data via the provided pump, and no query params. You have full control over headers and so on via this method.

void[] write(const(void)[] content, const(char)[] type);
Send content and no query params. The contentLength header will be set to match the provided content, and contentType set to the given type.


Page generated by Ddoc. Copyright (c) 2004 Kris Bell. All rights reserved