Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jacoblapworth opened this issue Feb 8, 2023 · 0 comments
Open

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

jacoblapworth opened this issue Feb 8, 2023 · 0 comments

Comments

@jacoblapworth
Copy link

jacoblapworth commented Feb 8, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant