Added Multipart Request Streaming Support and Cleanup#55
Merged
Conversation
Contributor
There was a problem hiding this comment.
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>
Contributor
There was a problem hiding this comment.
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.