-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Body implementations #42
Conversation
At Laracon EU right now. Best to not expect much from me till Thursday ;-) |
No problem. A gitter conversation after that? |
Yup |
i think this indeed looks like a good idea. in this case we won't have a body factory but just ask users to instantiate the appropriate object. i think for that reason it makes sense to have the common use cases right here in the contract package. the MessageFactory should also know about the body interface i think and use it when passed a body. this does not need to be a hard dependency as |
Well, I am struggling with that a little. But creating a php-http/body package for just a few classes which are actually part of the core doesn't seem to make much sense. |
i would say dont exagerate with granularity :-) as long as those body impl
do not add new dependencies its fine to have them directly.
|
Actually the MessageFactory has nothing to do with the Client/Adapter thing. The MessageFactory package has been built for PSR-7 and I would like to make it as small as possible. However I see the reason behind why it would make sense to handle Body classes in the message factory: some content might need custom headers. To solve this I am going to add a |
I tried to find better names for body implementations. Opinions? |
Add Body implementations Remove Data body interface, common interface is not needed Add Content headers to Body Body is optional, add HttpMethods trait Refactored body implementations
Merging this anyway, naming can be solved as part of Terminology. |
Add Body implementations
use Psr\Http\Message\StreamInterface; | ||
|
||
/** | ||
* Allows a more input types for body data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
grammatically confusing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, probably mixed two different wording. "Allows special input as body"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
No description provided.