Skip to content
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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Source/MultipartFormData.swift
Expand Up @@ -92,7 +92,7 @@ open class MultipartFormData {
// MARK: - Properties

/// The `Content-Type` header value containing the boundary used to generate the `multipart/form-data`.
open var contentType: String { return "multipart/form-data; boundary=\(boundary)" }
open lazy var contentType: String = "multipart/form-data; boundary=\(self.boundary)"

/// The content length of all body parts used to generate the `multipart/form-data` not including the boundaries.
public var contentLength: UInt64 { return bodyParts.reduce(0) { $0 + $1.bodyContentLength } }
Expand Down