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

enable setter of the MultipartFormData's contentType #2072

Merged
merged 1 commit into from Jun 16, 2017

Conversation

Projects
None yet
2 participants
@ericdesa
Contributor

ericdesa commented Apr 13, 2017

Purpose
The contentType of a MultipartFormData is multipart/form-data
We could need to set it to another value (ex. multipart/related), so i propose to set it writable

Usage

Alamofire.upload(multipartFormData: { mulitFormData -> Void in
        mulitFormData.contentType = "multipart/related; type=text/xml; boundary=\(mulitFormData.boundary)"
}, to: "https://example.com",
        method: .post,
        encodingCompletion: { encodingResult -> Void in
})
@cnoon

cnoon approved these changes Jun 16, 2017

@cnoon cnoon self-assigned this Jun 16, 2017

@cnoon cnoon added this to the 4.5.0 milestone Jun 16, 2017

@cnoon

This comment has been minimized.

Show comment
Hide comment
@cnoon

cnoon Jun 16, 2017

Member

Hi @ericdesa,

Thanks for putting this change together...much appreciated! This will be part of the AF 4.5 release shortly.

Thanks again! 🍻

Member

cnoon commented Jun 16, 2017

Hi @ericdesa,

Thanks for putting this change together...much appreciated! This will be part of the AF 4.5 release shortly.

Thanks again! 🍻

@cnoon cnoon merged commit 17f8d96 into Alamofire:master Jun 16, 2017

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment