Skip to content

BaseURLPrinter.parse(_:) does not include full base path #73

@jacoblapworth

Description

@jacoblapworth

Parsing a url that includes a path in the baseUrl fails with the example below:

let baseRouter = router.baseURL("https://google.com/v1")
let route = try! baseRouter.parse(URLRequestData(string: "https://google.com/v1/accounts")!)
Thread 1: Fatal error: 'try!' expression unexpectedly raised an error: error: multiple failures occurred

error: unexpected input
 --> input:1:2-3
1 | /v1/accounts
  |  ^^ expected "accounts"
  |  ^^ expected "transactions"
  |  ^^ expected "income"
  |  ^^ expected "me"

Should this match the print method, or should parsing only include the actual path to be parsed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions