-
Notifications
You must be signed in to change notification settings - Fork 56
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
feat(connect): add support for File type in requests #3189
feat(connect): add support for File type in requests #3189
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3189 +/- ##
==========================================
+ Coverage 86.69% 86.74% +0.05%
==========================================
Files 120 120
Lines 8155 8196 +41
Branches 1244 1260 +16
==========================================
+ Hits 7070 7110 +40
Misses 1071 1071
- Partials 14 15 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…h-Hilla-endpoints
…h-Hilla-endpoints
…h-Hilla-endpoints
…h-Hilla-endpoints
…h-Hilla-endpoints
packages/ts/frontend/src/Connect.ts
Outdated
} else { | ||
headers['Content-Type'] = 'application/json'; | ||
body = | ||
params !== undefined ? JSON.stringify(params, (_, value) => (value === undefined ? null : value)) : undefined; |
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.
We can make it a bit more readable.
params !== undefined ? JSON.stringify(params, (_, value) => (value === undefined ? null : value)) : undefined; | |
if (params) { | |
body = JSON.stringify(params, (_, value) => (value === undefined ? null : value)) | |
} |
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.
Also, to make SonarCloud happy, you can wrap repeating test in the function and use it
…h-Hilla-endpoints
Quality Gate passedIssues Measures |
Switches to multipart requests if a
File
object is found anywhere in the body object.Closes #3132