1 # string http\Client\Request::getContentType()
3 Extract the currently set "Content-Type" header.
4 See http\Client\Request::setContentType().
12 * string, the currently set content type.
13 * NULL, if no "Content-Type" header is set.
18 $multi = new http\Message\Body;
19 $multi->addPart(new http\Message("Content-type: text/plain\n\nHello part 1!"));
20 $multi->addPart(new http\Message("Content-type: text/plain\n\nHello part 2!"));
21 $request = new http\Client\Request("POST", "http://localhost/", [], $multi);
22 var_dump($request->getContentType());
27 string(49) "multipart/form-data; boundary="30718774.3fcf95cc""