Skip to content
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

Controller rest request body #1

Merged
merged 5 commits into from Jun 24, 2018

Conversation

ralflang
Copy link
Member

Add Request Body Stream to interface

I noticed Horde_Controller currently lacks any access to the body of a http request like post or put, unless it's form-encoded. In this case, getPostVars works well
For the REST usecase, I would want to post/put a json object string containing details.

Another use case would be handling some bulk upload like a file (owncloudish) or a media stream.

For the REST use case, just slurping stdin and returning it as a string would be sufficient.
For the latter, it would be more convenient to expose the stream resource - both memory and performance wise.
Horde_Stream has a __toString() to implicitly return a string where one is expected.

I noticed Horde_Controller currently lacks any access to the body of a http request like post or put, unless it's form-encoded. In this case, getPostVars works well
For the REST usecase, I would want to post/put a json object string containing details.

Another use case would be handling some bulk upload like a file (owncloudish) or a media stream.

For the REST use case, just slurping stdin and returning it as a string would be sufficient.
For the latter, it would be more convenient to expose the stream resource - both memory and performance wise.
Horde_Stream has a __toString() to implicitly return a string where one is expected.
@ralflang
Copy link
Member Author

Is there anything to do here?

@mrubinsk
Copy link
Member

Sorry for the delay. This looks good. Merging, thanks!

@mrubinsk mrubinsk merged commit 3c8e56f into horde:master Jun 24, 2018
mrubinsk added a commit that referenced this pull request Jul 4, 2018
mrubinsk added a commit that referenced this pull request Jul 4, 2018
mrubinsk added a commit that referenced this pull request Jul 4, 2018
@ralflang ralflang deleted the controller-rest-request-body branch September 24, 2018 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants