HttpClient

Berlioz HTTP Client is a PHP library to request HTTP server with continuous navigation, including cookies, sessions...

MIT License

Downloads
16.5K
Stars
6
Committers
6

Bot releases are hidden (Show)

HttpClient - v2.1.0

Published by ElGigi 6 months ago

Changed

  • Compatibility with package psr/log in versions 1.0, 2.0 and 3.0
HttpClient - v2.0.0 Latest Release

Published by ElGigi 7 months ago

Added

  • Options class to manage options of client
  • HttpContext class to pass context to adapters
  • 'context' option to personalize Proxy/SSL/... options of adapters
  • Retry option for NetworkException

Changed

  • Signature of AdapterInterface::sendRequest() method
  • Adapters accept context to personalize Proxy/SSL/... options
  • Undefined option returns NULL instead of exception
  • Force string cast in HarGenerator headers
  • Change method to get content and headers from CURL
  • Do not get content from HEAD requests
  • Bump version of elgigi/har-parser library to ^1.0

Removed

  • Remove deprecated default header "Accept-Charset"

Fixed

  • Normalize headers in options
  • Normalize default headers
  • Non-utf8 header value for HAR generation
  • Non-utf8 querystring value for HAR generation
  • Bug with clone method of PHP
  • Fix redirect for 307 and 308 http status
HttpClient - v2.0.0-beta5

Published by ElGigi about 2 years ago

Fixed

  • HTTP reason not encoded in UTF8 from response
HttpClient - v1.3.1

Published by ElGigi about 2 years ago

Fixed

  • Try to decode content if empty
  • Trimmed content before inflate failed
HttpClient - v2.0.0-beta4

Published by ElGigi over 2 years ago

Added

  • Write HAR file to a stream

Changed

  • Cookie::isSame() now compare only name, domain and path
  • HarParser renamed to HarHandler
  • HarAdapter accept a path of HAR file in constructor argument

Removed

  • Dependency with mbstring

Fixed

  • Try to decode content if empty
  • Trimmed content before inflate failed
  • Creation of request/response from HarAdapter use now cookies objects of har file instead of headers
HttpClient - v2.0.0-beta3

Published by ElGigi over 2 years ago

Added

  • New method DefaultHeadersTrait::addDefaultHeaders
  • New HarAdapter to simulate connection with HAR files

Changed

  • Base64 encoding for HAR response content

Fixed

  • Redirection keep old headers like Content-Length
  • Duplicate host header
HttpClient - v2.0.0-beta2

Published by ElGigi almost 3 years ago

Added

  • New method HarParser::addEntryToSession(Session $session, Entry $entry): void
  • New method HarParser::getTimings(Entry $entry): Timings
  • New method Session::getLastRequest(): ?RequestInterface
  • New method Session::getLastResponse(): ?ResponseInterface
  • New method Session::createFromHarFile(): Session
  • New callback option for requests
  • New followLocation option for requests, return 3xx Response object if it's a redirection
  • Add missing 'Content-Length' header during preparation of request

Changed

  • Visibility of method HarParser::getHttpRequest(Request $request): RequestInterface to public
  • Visibility of method HarParser::getHttpResponse(Response $response): ResponseInterface to public
  • Merge options of request with global options
  • Use previous request URI if "baseUri" option is not defined

Fixed

  • Default "sleepTime" option to 0
  • Conversion of "sleepTime" in ms to microseconds
HttpClient - v1.3.0

Published by ElGigi almost 3 years ago

Added

  • PHP 8.1 compatibility
HttpClient - v2.0.0-beta1

Published by ElGigi about 3 years ago

Added

  • Adapters
  • Option cookies for requests, to ignore cookies or force a specified manager
  • HAR file

Changed

  • Refactoring
HttpClient - v1.2.0

Published by ElGigi over 3 years ago

Changed

  • Visibility of Cookies class properties to protected
HttpClient - v1.1.0

Published by ElGigi over 3 years ago

Changed

  • Compatibility with berlioz/http-message version 2
HttpClient - v1.0.3

Published by ElGigi over 3 years ago

Fixed

  • Empty header value are now ignored
HttpClient - v1.0.2

Published by ElGigi over 3 years ago

Changed

  • Separate headers' parser into an independent trait to be reused
HttpClient - v1.0.1

Published by ElGigi over 3 years ago

Fixed

  • Fix cookie negative max-age
HttpClient - v1.0.0

Published by ElGigi almost 4 years ago

Initial version

Package Rankings
Top 14.93% on Packagist.org
Badges
Extracted from project README
Latest Version Software license Build Status Quality Grade Total Downloads
Related Projects