3 namespace Friendica\Network\HTTPClient\Capability;
5 use Psr\Http\Message\MessageInterface;
8 * Temporary class to map Friendica used variables based on PSR-7 HTTPResponse
10 interface ICanHandleHttpResponses
13 * Gets the Return Code
15 * @return string The Return Code
17 public function getReturnCode();
20 * Returns the Content Type
22 * @return string the Content Type
24 public function getContentType();
29 * @param string $header optional header field. Return all fields if empty
31 * @return string[] the headers or the specified content of the header variable
32 *@see MessageInterface::getHeader()
35 public function getHeader(string $header);
39 * @see MessageInterface::getHeaders()
43 public function getHeaders();
46 * Check if a specified header exists
47 * @see MessageInterface::hasHeader()
49 * @param string $field header field
51 * @return boolean "true" if header exists
53 public function inHeader(string $field);
56 * Returns the headers as an associated array
57 * @see MessageInterface::getHeaders()
60 * @return string[][] associated header array
62 public function getHeaderArray();
67 public function isSuccess();
72 public function getUrl();
77 public function getRedirectUrl();
80 * @see MessageInterface::getBody()
84 public function getBody();
89 public function isRedirectUrl();
94 public function getErrorNumber();
99 public function getError();
104 public function isTimeout();