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

Allow passing of content in request with file type body #1326

Closed

Conversation

dev-sharma-08
Copy link

This is being done to accept buffer data in file body.

@dev-sharma-08 dev-sharma-08 force-pushed the feature/allow-passing-content-for-body-type-file branch from 6b05594 to 398b771 Compare July 27, 2023 09:32
@dev-sharma-08 dev-sharma-08 force-pushed the feature/allow-passing-content-for-body-type-file branch from 398b771 to 36258a7 Compare July 28, 2023 06:55
@codecov-commenter
Copy link

codecov-commenter commented Jul 28, 2023

Codecov Report

Merging #1326 (d7f85b5) into develop (d9bea02) will not change coverage.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff            @@
##           develop     #1326   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           37        37           
  Lines         2167      2164    -3     
  Branches       658       658           
=========================================
- Hits          2167      2164    -3     
Flag Coverage Δ
unit 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
lib/collection/request-body.js 100.00% <ø> (ø)
lib/collection/form-param.js 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link

@Sanjay-shankar Sanjay-shankar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go

Copy link
Member

@coditva coditva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dev-sharma-08 Can we add tests for cases where non-serialisable data is passed?

@dev-sharma-08 dev-sharma-08 force-pushed the feature/allow-passing-content-for-body-type-file branch from a55ea86 to 41e8f4f Compare August 1, 2023 08:36
@dev-sharma-08 dev-sharma-08 force-pushed the feature/allow-passing-content-for-body-type-file branch from 41e8f4f to c2befcc Compare August 1, 2023 08:49
test/unit/request-body.test.js Show resolved Hide resolved
test/unit/request-body.test.js Show resolved Hide resolved
},
rBody = new RequestBody(definition);

expect(rBody.toJSON()).to.eql(definition);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would the result of serialisation of a ReadStream be? Wouldn't it be unusable? Do we want to keep this? @codenirvana

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toJSON() will have no effect on the readStream. It will remain usable, I have checked this.
Regarding wether we want to keep it @codenirvana can share his opinion.

@codenirvana codenirvana deleted the feature/allow-passing-content-for-body-type-file branch August 3, 2023 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants