Skip to content

Refactor ServerClient to handle MultipartRequests#376

Merged
olorin99 merged 2 commits intomainfrom
server-client-refactor
Feb 25, 2026
Merged

Refactor ServerClient to handle MultipartRequests#376
olorin99 merged 2 commits intomainfrom
server-client-refactor

Conversation

@jwr1
Copy link
Member

@jwr1 jwr1 commented Feb 25, 2026

  • Create a new method in ServerClient, postMultipart which contains properties for fields (map of Strings) and files (map of XFiles).
  • Remove unnecessary headers argument from existing methods. It was only used to specify a JSON content type, which is done automatically when body is provided.
  • Stop using ServerClient's HTTP client for external requests, as that passes them authentication headers, and would essentially give them full access to the signed-in account if they knew what to do with it. Let's just hope neither image hosting service is malicious.

@jwr1 jwr1 requested a review from olorin99 February 25, 2026 00:33
@olorin99 olorin99 merged commit f729a5d into main Feb 25, 2026
3 checks passed
@olorin99 olorin99 deleted the server-client-refactor branch February 25, 2026 10:47
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.

2 participants