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.
resolves #32
Changes
Added an executeAsync that returns a PromiseInterface. The interface is an extension of the guzzle interface - it's a good standard but this does mean that every client needs to have an adapter. The upside is that the generated code just has a sailor provided interface, not guzzle.
The alternative is that you could specify an async interface you want to use when generating - this would make it easier to use both when making your own client, as well as using the responses. in the current implementation, you'll need to unwrap the promise using your own library's async.
I've also provided a default async guzzle and guzzle adapter.
I didn't update the tests that compare the output generation.
Breaking changes
N/A