小编sat*_*ish的帖子

如何在Moya中通过POST请求传递JSON正文

我正在使用moya库发出POST请求。在Tar​​getType中,我看不到任何属性来将参数[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)

ios swift moya

6
推荐指数
1
解决办法
5799
查看次数

请求交易时出错

当我在 CXStratCallAction 中请求 CXTansaction 时,它将错误消息显示为 "Error Domain=com.apple.CallKit.error.requesttransaction Code=1 "(null)" ". 任何人都可以解释此错误消息。

ios swift callkit

5
推荐指数
2
解决办法
1291
查看次数

标签 统计

ios ×2

swift ×2

callkit ×1

moya ×1