Draft
Conversation
Contributor
|
Nice new feature! |
bortefi
reviewed
Sep 14, 2022
4651b17 to
ad1490d
Compare
Contributor
Author
|
Code works pretty well - but psalm is not able to infer the return types. Making it quite hard to use with psalm currently. Alternative is to work with mixed types instead and let upstream deal with figuring out the types - which is not really how I'dd like this to work. Keeping this one as-is for now! |
0a4a96e to
d7fb885
Compare
Contributor
|
Nice feature! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sometimes you just want to grab something from the interwebz...
This PR introduces an API similar to Javascript's fetch and shortcut aliases like the axios package.
It is built on top of the transport system, so that you can quickly transform json or deserialize the result into objects.
By default, it uses the new
PsrPreset::sync(), which accepts a raw string as data and returns a PSR-7 Response.Example usage:
Functions:
TODO: