-
Notifications
You must be signed in to change notification settings - Fork 5
[TECH-DEBIT] Add support for handling non-text (binary) responses in the Request class #289
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestgitautoGitAuto label to trigger the app in a issue.GitAuto label to trigger the app in a issue.good first issueGood for newcomersGood for newcomershacktoberfestParticipation in the Hacktoberfest eventParticipation in the Hacktoberfest eventhelp wantedExtra attention is neededExtra attention is needed♻️ code qualityCode quality-related tasks or issuesCode quality-related tasks or issues📝 documentationTasks related to writing or updating documentationTasks related to writing or updating documentation🕔 high effortA task that can be completed in a few daysA task that can be completed in a few days🧑💻 tech-debitTechnical debt that needs to be addressedTechnical debt that needs to be addressed🧪 testsTasks related to testingTasks related to testing
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgitautoGitAuto label to trigger the app in a issue.GitAuto label to trigger the app in a issue.good first issueGood for newcomersGood for newcomershacktoberfestParticipation in the Hacktoberfest eventParticipation in the Hacktoberfest eventhelp wantedExtra attention is neededExtra attention is needed♻️ code qualityCode quality-related tasks or issuesCode quality-related tasks or issues📝 documentationTasks related to writing or updating documentationTasks related to writing or updating documentation🕔 high effortA task that can be completed in a few daysA task that can be completed in a few days🧑💻 tech-debitTechnical debt that needs to be addressedTechnical debt that needs to be addressed🧪 testsTasks related to testingTasks related to testing
The
Requestclass currently only supports text-based HTTP requests and responses (e.g., JSON, HTML, or plain text). This creates a limitation when dealing with binary data, such as file uploads and downloads, where the request or response body may contain non-text content.To address this technical debt and enhance functionality, the
Requestclass should be extended to support handling binary content for both uploads and downloads. This includes updating the class to:Content-TypeandContent-Disposition) to determine the type of content.Acceptance Criteria
Requestclass to support sending binary data for file uploads.Content-Type).Responseclass to support binary content (e.g., storing raw binary data in thebodyproperty).Requestclass does not decode binary responses as text (e.g., avoidjson_decodeor string manipulation on binary data).Example
Current Behavior:
Expected Behavior (File Download):
Expected Behavior (File Upload):
Sample implementation
Additional Notes