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

refactor(http): refactor http client #3482

Merged
merged 3 commits into from
Apr 24, 2024
Merged

refactor(http): refactor http client #3482

merged 3 commits into from
Apr 24, 2024

Conversation

glowcloud
Copy link
Contributor

Refs #3481

  1. Moved request and response serializing/encoding into separate files
  2. Moved the logic introduced by fix(execute): fix encoding for stringified request body #3476 and fix(execute): parse stringified objects #3474 to request builder

@glowcloud
Copy link
Contributor Author

  1. For placement of response and request serializers - mergeInQueryOrForm is also used in one place in execute, but it's also for building requests, so it still seemed related to http
  2. I also thought about leaving index in http just for exports - let me know if that would be better and the functions should be moved to an additonal file, ex. http.js
  3. file and format functions are only used for request serializing/encoding and in tests, so also looks like it's an appropriate place for them to be

src/http/index.js Outdated Show resolved Hide resolved
src/http/index.js Outdated Show resolved Hide resolved
Copy link
Member

@char0n char0n left a comment

Choose a reason for hiding this comment

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

Looks cleaner and more maintainable for sure. Nicely done!

Please have a look at my CRCs.

src/http/index.js Outdated Show resolved Hide resolved
src/http/index.js Outdated Show resolved Hide resolved
Copy link
Member

@char0n char0n left a comment

Choose a reason for hiding this comment

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

@glowcloud glowcloud merged commit c4198da into master Apr 24, 2024
5 checks passed
@glowcloud glowcloud deleted the issue-3481 branch April 24, 2024 07:15
swagger-bot pushed a commit that referenced this pull request May 6, 2024
## [3.27.3](v3.27.2...v3.27.3) (2024-05-06)

### Bug Fixes

* **http:** fix parsing null values when building requests ([#3498](#3498)) ([8846cc7](8846cc7)), closes [#3482](#3482)
@swagger-bot
Copy link
Contributor

🎉 This PR is included in version 3.27.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants