all current config settings */ public function getConfig(): array; /** * Return the full url as it was sent * * @return string url sent */ public function getUrlSent(): string; /** * get the parsed url * * @return array{scheme?:string,user?:string,host?:string,port?:string,path?:string,query?:string,fragment?:string,pass?:string} */ public function getUrlParsedSent(): array; /** * Return the full headers as they where sent * * @return array */ public function getHeadersSent(): array; /** * set, add or overwrite header * On default this will overwrite header, and not set * * @param array> $header * @param bool $add [default=false] if set will add header to existing value * @return void */ public function setHeaders(array $header, bool $add = false): void; /** * remove header entry * if key is only set then match only key, if both are set both sides must match * * @param array $remove_headers * @return void */ public function removeHeaders(array $remove_headers): void; /** * Update the base url set, if empty will unset the base url * * @param string $base_uri * @return void */ public function setBaseUri(string $base_uri): void; /** * combined set call for any type of request with options type parameters * * phpcs:disable Generic.Files.LineLength * @param string $type * @param string $url * @param array{auth?:null|array{0:string,1:string,2:string},headers?:null|array>,query?:null|array,body?:null|string|array,http_errors?:null|bool} $options * @return array{code:string,headers:array>,content:string} Result code, headers and content as array, content is json * @throws \UnexpectedValueException on missing body data when body data is needed * phpcs:enable Generic.Files.LineLength */ public function request(string $type, string $url, array $options = []): array; } // __END__