Add Request
class to represent outgoing HTTP request message
#480
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.
This changeset adds a
Request
class to represent an outgoing HTTP request message. This class implements the PSR-7RequestInterface
which extends the PSR-7MessageInterface
. It is mostly used internally to represent each outgoing HTTP request message for the HTTP client implementation. Likewise, you can also use this class with other HTTP client implementations and for tests.This class complements our other PSR-7 implementations (#370 and others) and is one step further towards moving away from the RingCentral implementations as discussed in #331/#437. On top of this, this PR is done in preparation for HTTP keep-alive support as discussed in #468/#39. Once this PR is merged, I'll file the next follow-up PRs to reuse this class for our outgoing request messages much like already done for the incoming response messages as per #389.