-1

What if path is more complex? How can I get URLComponenets get work is path is this?

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

unfortunatelly it fails here:

guard let uriString = urlComponents.url?.absoluteString else {
    return request.eventLoop.makeFailedFuture(Abort(.badRequest))
}
János
  • 32,867
  • 38
  • 193
  • 353

1 Answers1

0

In terms of URLComponents a path must start with a slash

urlComponents.path = "/v3/sandbox115e22c785254f36953c9f28337689bb.mailgun.org/message"
vadian
  • 274,689
  • 30
  • 353
  • 361