-1

如果path更复杂怎么办?我怎样才能让 URLComponenets 工作是路径是这个?

urlComponents.path = "v3/sandbox115e22c785254f36953c9f28337689bb.mailgun.org/message"

不幸的是,它在这里失败了:

guard let uriString = urlComponents.url?.absoluteString else {
    return request.eventLoop.makeFailedFuture(Abort(.badRequest))
}
4

1 回答 1

0

URLComponents路径而言,必须以斜杠开头

urlComponents.path = "/v3/sandbox115e22c785254f36953c9f28337689bb.mailgun.org/message"
于 2020-09-22T14:20:20.743 回答