- Made this library compatible with
xp-forge/uri
, version 3.0+ (@thekid)
- Made marshalling member of
webservices.rest.Endpoint
public in order to be able to register user type mappings, see xp-forge/marshalling#7 (@thekid) - Merged PR #34: Add
TestCall::content()
which returns marshalled payload (@thekid)
- Ensured URL segments are encoded correctly - @thekid
- Made compatible with XP 12 - @thekid
- Added PHP 8.4 to the test matrix - @thekid
- Added compatibility with
xp-forge/marshalling
v2.0.0 - @thekid
- Merged PR #33: Support "text/json" mimetype in addition to the correct "application/json", see https://stackoverflow.com/a/69518701 (@thekid)
- Merged PR #31: Migrate to new testing library - @thekid
- Merged PR #30: Add RestResource::uri() - @thekid
- Merged PR #28: Support segments in TestEndpoint routes - @thekid
- Fixed issue #27: Cannot deserialize from application/rdap+json - @thekid
- Merged PR #24: Add possibility to modify read and connect timeouts (@thekid)
- Fixed exchanging log categories - @thekid
- Merged PR #23: Fix missing port - @thekid
This release brings compression handling to this library. Algorithms supported by the setup are transmitted with the Accept-Encoding header. Handling for compressed response data is determined by looking at the Content-Encoding header. Heads up: If you've been manually doing this before, read the "BC break and refactoring" section in #22.
- Fixed "Creation of dynamic property" warnings in PHP 8.2 - @thekid
- Merged PR #22: Compression, implementing feature request #21. Adds a
dependency on the new
xp-forge/compression
library. (@thekid)
This major release makes the result API, which has proven to be far more useful than the previous low-level one, the default. This makes a clean cut but also breaks backward compatibility, and all your code will need to be thoroughly checked before migrating!
- Merged PR #20: Fold result into response. The
value()
andlinks()
methods' behavior has changed,result()
has been removed. (@thekid)
- Merged PR #19: Testability, adding a
webservices.rest.TestEndpoint
class which can be used for testing purposes (@thekid)
- Merged PR #18: Add support for bearer tokens embedded directly in base
URI, e.g.
https://token@example.org/api/v1
(@thekid)
This major release drops compatibility with XP 9-SERIES. XP 9.0.0 was released 2017-09-24, more than 4 years ago and has no support for PHP 8, released roughly a year ago at the time of writing.
- Heads up: Minimum required XP version is 10, see xp-framework/rfc#341 (@thekid)
- Added compatibility with XP 11,
xp-framework/logging
version 11.0.0 andxp-forge/json
version 5.0.0 (@thekid)
- Merged PR #17 - Implement file uploads. The new
upload()
method in thewebservices.rest.RestResource
class initiates a multipart/form-data request, to which both files and parameters can be added. (@thekid)
- Fixed PHP 8.1 compatibility by declaring
getIterator()
with correct return type. See issue #16. (@thekid)
- Added
webservices.rest.Endpoint::headers()
accessor - @thekid
- Merged PR #15: Deprecate high-level functions on low-level response (@thekid)
- Added
webservices.rest.Result::status()
method to access HTTP status (@thekid) - Added
webservices.rest.Result::link()
method to access links with a givenrel
attribute, see for example how GitHub implements pagination: https://docs.github.com/en/rest/overview/resources-in-the-rest-api#pagination (@thekid) - Merged PR #14: Fluent result interface. This pull request adds a new
RestResponse::result()
method which returnsResult
instances with high-level access to responses including handling of unexpected status codes along typical REST usage patterns. (@thekid)
- Fixed issue #13: PHP 8.1 warnings - @thekid
- Fixed issue #12: Errors for responses without content type - @thekid
This major release drops PHP 5 support. PHP 5 has been EOL since the end 2018, see https://www.php.net/eol.php. Dropping support for it enables us to make use a variety of PHP 7 features.
- Implemented xp-framework/rfc#334: Drop PHP 5.6:
. Heads up: Minimum required PHP version now is PHP 7.0.0
. Rewrote code base, grouping use statements
. Converted
newinstance
to anonymous classes . Rewroteisset(X) ? X : default
toX ?? default
(@thekid)
- Made compatible with
xp-forge/uri
version 2.0.0 - @thekid
- Implemented RFC #335: Remove deprecated key/value pair annotation syntax (@thekid)
- Made compatible with XP 10 - @thekid
The first release to be used in production. The API has now stabilized.
- Added
RestResponse::links()
method to access the Link header (@thekid) - Added method to supply headers to be sent with every request using
Endpoint::with()
. (@thekid)
- Merged PR #11: Implement support for ndjson - @mikey179
- Fixed wrapping of exceptions from
execute()
inRestException
s. (@thekid)
- Fixed issue #9: Added missing RestException class - @thekid
- Added compatibility with older xp-framework/logging releases - @thekid
- Merged PR #8: RestFormat - @thekid
- Merged PR #7: Logging - @thekid
- Improved
Endpoint::connecting()
to also accept callables using either the array or "Class::method" string syntax. (@thekid)
- Merged PR #6: Cookies - @thekid
- Merged PR #5: Add new static
Links::in()
method which accepts null and returns an empty header; thus simplifying its usage. (@thekid)
- Merged PR #4: Parse "Link" headers as defined per RFC 5988 - @thekid
- Fixed parameters supplied in resource appearing twice in request URL (@thekid)
- Default mime type for resources'
post()
,put()
andpatch()
methods toapplication/x-www-form-urlencoded
. (@thekid) - Fixed
application/x-www-form-urlencoded
format not serializing data (@thekid)
- Allowed transferring
NULL
as payload - @thekid - Fixed Too few arguments to {closure}() when using buffered transfers (@thekid)
- Heads up: All classes are now inside the package
webservices.rest
! (@thekid) - Fixed issue #1: Incompatible types when using rest-client together with rest-api library (@thekid)
- Hello World! First release - @thekid