-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
[swift] to support application/octet-stream for file upload #15140
Conversation
@@ -618,6 +620,24 @@ private class FormURLEncoding: ParameterEncoding { | |||
} | |||
} | |||
|
|||
private class OctetStreamEncoding: ParameterEncoding { |
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.
thanks for the PR. can you please add a line or 2 explaining what this class (and function encode
) does?
Erm. This is swift 🙂 |
oops.. sorry. thanks for the correction |
@@ -128,6 +128,8 @@ private var credentialStore = SynchronizedDictionary<Int, URLCredential>() | |||
encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) | |||
} else if contentType.hasPrefix("application/x-www-form-urlencoded") { | |||
encoding = FormURLEncoding() | |||
} else if contentType.hasPrefix("application/octet-stream"){ |
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.
@aniruddhJo Hi, thanks for creating this PR.
Could you please also add support for application/octet-stream
in alamofire please?
Thanks
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.
created a ticket to track this: #16300
closed via #16299 |
To fix #15129
PR checklist
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*
.For Windows users, please run the script in Git BASH.
master
(6.3.0) (minor release - breaking changes with fallbacks),7.0.x
(breaking changes without fallbacks)