RequestMultipartFormData

public protocol RequestMultipartFormData : AnyObject

请求表单数据定义

  • 添加表单数据,指定名称

    Declaration

    Swift

    func append(_ formData: Data, name: String)
  • 添加文件数据,指定fileName、mimeType

    Declaration

    Swift

    func append(_ fileData: Data, name: String, fileName: String, mimeType: String)
  • 添加文件URL,自动处理fileName、mimeType

    Declaration

    Swift

    func append(_ fileURL: URL, name: String)
  • 添加文件URL,指定fileName、mimeType

    Declaration

    Swift

    func append(_ fileURL: URL, name: String, fileName: String, mimeType: String)
  • 添加输入流,指定fileName、mimeType

    Declaration

    Swift

    func append(_ inputStream: InputStream, length: UInt64, name: String, fileName: String, mimeType: String)
  • 添加输入流,指定头信息

    Declaration

    Swift

    func append(_ inputStream: InputStream, length: UInt64, headers: [String : String])
  • 添加body数据,指定头信息

    Declaration

    Swift

    func append(_ body: Data, headers: [String : String])