Skip to content

url encoded within restapi url component #226

@uriklagnes

Description

@uriklagnes

Hi,

I'm trying to create an API with scheme
POST /some/base/url/{{ some other url encoded here }}

Where the last part of the url is extracted by router, but it is itself an url that has been encoded by front end code.

So {{ some other url encoded here }} will be something like http://www.google.ca

(But the front end will encode this as http%3A%2F%2Fwww.google.ca first)

The problem is, when front end does the POST call, it gets a 404.
My hunch is that the router must be "seeing" the URL as the real URL and is trying to match on:
/some/base/url/http://www.google.ca <-- it is seeing the two // within url.

Is there a way for me to actually confirm this? Because the 404 is coming from the router not my app.
Is there a workaround?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions