use Friendica\Network\HTTPClient\Response\GuzzleResponse;
use Friendica\Network\HTTPClient\Capability\ICanSendHttpRequests;
use Friendica\Network\HTTPClient\Capability\ICanHandleHttpResponses;
-use Friendica\Network\HTTPException\InternalServerErrorException;
use Friendica\Util\Network;
use Friendica\Util\Profiler;
use GuzzleHttp\Client;
*/
class HttpClient implements ICanSendHttpRequests
{
+ /** @var string Default value for "Accept" header */
+ const DEFAULT_ACCEPT = '*/*';
+
/** @var LoggerInterface */
private $logger;
/** @var Profiler */
}
};
+ if (empty($conf[HttpClientOptions::HEADERS]['Accept'])) {
+ $conf[HttpClientOptions::HEADERS]['Accept'] = static::DEFAULT_ACCEPT;
+ }
+
try {
$this->logger->debug('http request config.', ['url' => $url, 'method' => $method, 'options' => $conf]);