VirusTotalNet icon indicating copy to clipboard operation
VirusTotalNet copied to clipboard

Issue #159 Added support for binary data in request and response

Open erlendv opened this issue 6 years ago • 10 comments

Adds support for binary data in requests and responses. https://github.com/openfaas/templates/issues/159

Description

Added IResponse.setBody(byte[]), IResponse.getBodyData() and implemented them in Response Added IRequest.getInputStream() and implemented it in Request Changed entrypoint App to use these new methods.

Motivation and Context

https://github.com/openfaas/templates/issues/159

  • [x] I have raised an issue to propose this change (required)

Which issue(s) this PR fixes

Fixes https://github.com/openfaas/templates/issues/159

How Has This Been Tested?

Added tests to RequestTest and ResponseTest. Verified that my original problem described in https://github.com/openfaas/templates/issues/159 is fixed.

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [x] My code follows the code style of this project.
  • [ ] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [x] I've read the CONTRIBUTION guide
  • [x] I have signed-off my commits with git commit -s
  • [x] I have added tests to cover my changes.
  • [x] All new and existing tests passed.

erlendv avatar Jul 19 '19 10:07 erlendv

Thank you for your contribution. I've just checked and your commit doesn't appear to be signed-off. That's something we need before your Pull Request can be merged. Please see our contributing guide. Tip: if you only have one commit so far then run: git commit --amend --signoff and then git push --force.

derek[bot] avatar Jul 19 '19 10:07 derek[bot]

Please could you squash both commits into one? You should be able to get help from Google as this is a common practice. Failing that route, the community is active on Slack and always ready to help contributors.

Thank you for your PR

alexellis avatar Aug 01 '19 19:08 alexellis

/msg: slack

alexellis avatar Aug 01 '19 19:08 alexellis

-- Join Slack to connect with the community https://docs.openfaas.com/community

derek[bot] avatar Aug 01 '19 19:08 derek[bot]

@erlendv please take a look at the comments and squash down your commits into one, when you are ready. This is a good change so I would like to get it in soon.

alexellis avatar Aug 02 '19 16:08 alexellis

Sorry for late feedback @alexellis and @kameshchauhan. Im on vacation so a bit online/offline. I will fix shortly!

erlendv avatar Aug 02 '19 18:08 erlendv

Thank you @erlendv - please could you sign-off your commits? If you need help, please ask on Slack.

alexellis avatar Aug 09 '19 09:08 alexellis

Perhaps we can squash the 5 commits with git reset HEAD~5 and then add / commit them again?

alexellis avatar Aug 09 '19 09:08 alexellis

I think I (finally) managed to squash the commits and have the one signed off @alexellis. All requested changes have been implemented.

erlendv avatar Aug 11 '19 20:08 erlendv

@alexellis I think til PR is all good now? All requested changes have been done, all commits squashed and the one commit is signed off.

erlendv avatar Sep 26 '19 06:09 erlendv