From: Michael Wallner Date: Tue, 5 Nov 2013 13:12:59 +0000 (+0100) Subject: flush X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=c31e3a44e57dc4ae228d21448e67e2090c0a494d;p=mdref%2Fmdref-http flush --- diff --git a/http/Client/Request/__construct.md b/http/Client/Request/__construct.md new file mode 100644 index 0000000..e14a7ad --- /dev/null +++ b/http/Client/Request/__construct.md @@ -0,0 +1,24 @@ +# void http\Client\Request::__construct([string $meth = NULL[, string $url = NULL[, array $headers = NULL[, http\Message\Body $body = NULL]]]]) + +Create a new client request message to be enqueued and sent by http\Client. + +## Params: + +* Optional string $meth = NULL + The request method. +* Optional string $url = NULL + The request URL. +* Optional array $headers = NULL + HTTP headers. +* Optional http\Message\Body $body = NULL + Request body. + +## Throws: + +* http\Exception. + +## Example: + + diff --git a/http/Client/Request/addQuery.md b/http/Client/Request/addQuery.md new file mode 100644 index 0000000..5ecd5ab --- /dev/null +++ b/http/Client/Request/addQuery.md @@ -0,0 +1,13 @@ +# http\Client\Request http\Client\Request::addQuery(mixed $query_data) + +Add querystring data. +See http\Client\Request::setQuery() and http\Message::setRequestUrl(). + +## Params: + +* mixed $query_data + Additional querystring data. + +## Returns: + +* http\Client\Request, self. diff --git a/http/Client/Request/addSslOptions.md b/http/Client/Request/addSslOptions.md new file mode 100644 index 0000000..40b4bd3 --- /dev/null +++ b/http/Client/Request/addSslOptions.md @@ -0,0 +1,13 @@ +# http\Client\Request http\Client\Request::addSslOptions([array $ssl_options = NULL]) + +Add specific SSL options. +See http\Client\Request::setSslOptions(), http\Client\Request::setOptions() and http\Client\Curl::$ssl options. + +## Params: + +* Optional array $ssl_options = NULL + Add this SSL options. + +## Returns: + +* http\Client\Request, self. diff --git a/http/Client/Request/getContentType.md b/http/Client/Request/getContentType.md new file mode 100644 index 0000000..86097e8 --- /dev/null +++ b/http/Client/Request/getContentType.md @@ -0,0 +1,27 @@ +# string http\Client\Request::getContentType() + +Extract the currently set "Content-Type" header. +See http\Client\Request::setContentType(). + +## Params: + +None. + +## Returns: + +* string, the currently set content type. +* NULL, if no "Content-Type" header is set. + +## Example: + + addPart(new http\Message("Content-type: text/plain\n\nHello part 1!")); + $multi->addPart(new http\Message("Content-type: text/plain\n\nHello part 2!")); + $request = new http\Client\Request("POST", "http://localhost/", [], $multi); + var_dump($request->getContentType()); + ?> + +Yields: + + string(49) "multipart/form-data; boundary="30718774.3fcf95cc"" diff --git a/http/Client/Request/getOptions.md b/http/Client/Request/getOptions.md new file mode 100644 index 0000000..dcf2739 --- /dev/null +++ b/http/Client/Request/getOptions.md @@ -0,0 +1,12 @@ +# array http\Client\Request::getOptions() + +Get priorly set options. +See http\Client\Request::setOptions(). + +## Params: + +None. + +## Returns: + +* array, options. diff --git a/http/Client/Request/getQuery.md b/http/Client/Request/getQuery.md new file mode 100644 index 0000000..44f503b --- /dev/null +++ b/http/Client/Request/getQuery.md @@ -0,0 +1,24 @@ +# string http\Client\Request::getQuery() + +Retrieve the currently set querystring. + +## Params: + +None. + +## Returns: + +* string, the currently set querystring. +* NULL, if no querystring is set. + +## Example: + + getQuery()); + var_dump((new http\Client\Request("GET", "http://localhost/?foo"))->getQuery()); + ?> + +Yields: + + NULL + string(3) "foo" diff --git a/http/Client/Request/getSslOptions.md b/http/Client/Request/getSslOptions.md new file mode 100644 index 0000000..41d3583 --- /dev/null +++ b/http/Client/Request/getSslOptions.md @@ -0,0 +1,12 @@ +# array http\Client\Request::getSslOptions() + +Retrive priorly set SSL options. +See http\Client\Request::getOptions() and http\Client\Request::setSslOptions(). + +## Params: + +None. + +## Returns: + +* array, SSL options. diff --git a/http/Client/Request/setContentType.md b/http/Client/Request/setContentType.md new file mode 100644 index 0000000..6422529 --- /dev/null +++ b/http/Client/Request/setContentType.md @@ -0,0 +1,17 @@ +# http\Client\Request http\Client\Request::setContentType(string $content_type) + +Set the MIME content type of the request message. + +## Params: + +* string $content_type + The MIME type used as "Content-Type". + +## Returns: + +* http\Client\Request, self. + + +## Errors: + +* HTTP_E_INVALID_PARAM, if $content_type does not follow the general "primary/secondary" notation. diff --git a/http/Client/Request/setOptions.md b/http/Client/Request/setOptions.md new file mode 100644 index 0000000..4742d44 --- /dev/null +++ b/http/Client/Request/setOptions.md @@ -0,0 +1,16 @@ +# http\Client\Request http\Client\Request::setOptions([array $options = NULL]) + +Set client options. +See http\Client::setOptions() and http\Client\Curl. + +> **Note:** Only options specified prior enqueueing a request are applied to the request. + +## Params: + +* Optional array $options = NULL + The options to set. + +## Returns: + +* http\Client\Request, self. + diff --git a/http/Client/Request/setQuery.md b/http/Client/Request/setQuery.md new file mode 100644 index 0000000..009acbd --- /dev/null +++ b/http/Client/Request/setQuery.md @@ -0,0 +1,25 @@ +# http\Client\Request http\Client\Request::setQuery([mixed $query_data = NULL]) + +(Re)set the querystring. +See http\Client\Request::addQuery() and http\Message::setRequestUrl(). + +## Params: + +* mixed $query_data, new querystring data. + +## Returns: + +* http\Client\Request, self. + +## Example: + + setQuery($q); + var_dump($r->getRequestUrl()); + ?> + +Yields: + + string(33) "http://localhost/?foo=bar&bar=foo" diff --git a/http/Client/Request/setSslOptions.md b/http/Client/Request/setSslOptions.md new file mode 100644 index 0000000..dce1008 --- /dev/null +++ b/http/Client/Request/setSslOptions.md @@ -0,0 +1,13 @@ +# http\Client\Request http\Client\Request::setSslOptions([array $ssl_options = NULL]) + +Specifically set SSL options. +See http\Client\Request::setOptions() and http\Client\Curl::$ssl options. + +## Params: + +* Optional array $ssl_options = NULL + Set SSL options to this array. + +## Returns: + +* http\Client\Request, self.