我正在使用moya库发出POST请求。在TargetType中,我看不到任何属性来将参数[JSON body]与POST请求一起传递。在这里,我附加了TargetType
public protocol TargetType {
/// The target's base `URL`.
var baseURL: URL { get }
/// The path to be appended to `baseURL` to form the full `URL`.
var path: String { get }
/// The HTTP method used in the request.
var method: Moya.Method { get }
/// Provides stub data for use in testing.
var sampleData: Data { get }
/// The type of HTTP task to be performed.
var task: Task { get …
Run Code Online (Sandbox Code Playgroud) 当我在 CXStratCallAction 中请求 CXTansaction 时,它将错误消息显示为 "Error Domain=com.apple.CallKit.error.requesttransaction Code=1 "(null)" "
. 任何人都可以解释此错误消息。