-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
  • 27,206
  • 24
  • 130
  • 270

1 Answers1

0

In terms of URLComponents a path must start with a slash

urlComponents.path = "/v3/sandbox115e22c785254f36953c9f28337689bb.mailgun.org/message"
vadian
  • 232,468
  • 27
  • 273
  • 287