-
Notifications
You must be signed in to change notification settings - Fork 1
Added Multipart Request Streaming Support and Cleanup #55
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
Conversation
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.
Pull request overview
This pull request removes the NewsAPI and WeatherAPI client implementations from the repository and introduces streaming support for multipart form data uploads to handle large files efficiently without buffering them entirely in memory.
Changes:
- Removed NewsAPI and WeatherAPI client packages including all implementation files, tests, and documentation
- Added
NewStreamingMultipartRequestfunction that uses io.Pipe and goroutines to stream multipart data - Added comprehensive tests for streaming multipart payloads covering various scenarios (large files, partial reads, cleanup)
- Updated README.md to document the new streaming API and remove references to the deleted client packages
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| streaming_payload.go | New file implementing streaming multipart requests using io.Pipe and background goroutines |
| pkg/newsapi/*.go | Complete removal of NewsAPI client implementation and tests |
| pkg/newsapi/README.md | Removal of NewsAPI documentation |
| pkg/weatherapi/*.go | Complete removal of WeatherAPI client implementation and tests |
| payload_test.go | Added comprehensive tests for streaming multipart functionality |
| README.md | Updated documentation to include streaming API and removed references to deleted clients |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Pull request overview
Copilot reviewed 19 out of 20 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This pull request removes the NewsAPI and WeatherAPI clients from the repository, including all related implementation, tests, documentation, and references. Additionally, it introduces new tests for streaming multipart payloads in the core client and updates the documentation to reflect these changes.
Removal of NewsAPI and WeatherAPI Clients:
pkg/newsapidirectory, including all source files (client.go,articles.go,sources.go,opts.go), tests, and documentation (README.md). [1] [2] [3] [4] [5] [6] [7]pkg/weatherapi/client.go).README.md.Core Client Enhancements and Testing:
payload_test.go).payload_test.goto support new streaming multipart tests.Documentation Updates:
README.mdto document the newclient.NewStreamingMultipartRequestmethod, including usage recommendations for large file uploads. [1] [2]README.md, streamlining the documentation.