-
Notifications
You must be signed in to change notification settings - Fork 16
SPM Prep – Add multipart POST method to WordPressComRESTAPIInterfacing
#765
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
WordPressKit/FilePart.h
Outdated
fileName:(NSString * _Nonnull)fileName | ||
mimeType:(NSString * _Nonnull)mimeType; | ||
|
||
@end |
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.
A sad but necessary step back into Objective-C.
Luckily, this was a PONSO to begin with even in Swift, so we didn't lose any functionality.
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.
TIL "Plain Old NSObject" 😄
WordPressKit/FilePart.h
Outdated
fileName:(NSString * _Nonnull)fileName | ||
mimeType:(NSString * _Nonnull)mimeType; | ||
|
||
@end |
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.
TIL "Plain Old NSObject" 😄
returns nil it's because something happened on the request serialization and the network request was not started, but the failure callback | ||
will be invoked with the error specificing the serialization issues. | ||
*/ | ||
@objc @discardableResult open func multipartPOST(_ URLString: String, |
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 could add a @nonobj
to this function here, so that it won't be bridged to Objective-C, which will conflicts with the other almost exact function. However, if that ever happens for some reason, the compiler probably would warn us, even without @nonobj
. Maybe I worry too much...
Given this function a @nonobjc
declaration also convey that the other multiparPOST
is for Objective-C, not this one.
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.
TIL "Plain Old NSObject" 😄
TIL @nonobjc
😄
🙌
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.
Addressed in d7d0bf7.
Auto-merged enabled. Then I'll ship version 15.0.0 as discussed in #767 (comment)
Description
Follows up #761 adding a method to the protocol for multipart POST.
Testing Details
Green CI
Next up
Basically, cherry-pick the work from #738 but in a neat and reviewable order:
Sources/
andTests/
respectively #764Bundle
helper that differentiates between SPM and CocoaPods installationsSee also, #756, #758, #760 which are related to the SPM work but independent from this one.
CHANGELOG.md
if necessary. — N.A.