import Foundation

public enum RequestBodyEntity {
    case Data(NSData)
    case InputStream(NSInputStream)
}

public protocol BodyParametersType {
    var contentType: String { get }
    var entity: RequestBodyEntity { get }
}

import Foundation

public enum RequestBodyEntity {
    case Data(NSData)
    case InputStream(NSInputStream)
}

public protocol BodyParametersType {
    var contentType: String { get }

    func buildEntity() throws -> RequestBodyEntity
}

Use func for building entity to throw errors
Use func for building entity to throw errors
