Skip to content

Paginated API URL's should be excluded from being escaped #22

@jhofstede

Description

@jhofstede

When I query an paginated endpoint with a date-filter, next-refs are double escaped.

If you start with a paginated request like this.

client.get('/logs?since=2019-08-01T00:00:00.000Z&until=2019-08-15T00:00:00.000Z&filter=eventType+eq+"user.session.start"', paginate: true)

The raw response of the HTTP-request will contain a link to the next page:

/logs?after=1565220135395_1&filter=eventType+eq+%22user.session.start%22&since=2019-08-01T00%3A00%3A00.000Z&until=2019-08-15T00%3A00%3A00.000Z

But request (found here) will also URI-escape the already escaped URL, resulting in double escaped URI's and hence in a Oktakit::BadRequest

/logs?after=1565220135395_1&filter=eventType+eq+%2522user.session.start%2522&since=2019-08-01T00%253A00%253A00.000Z&until=2019-08-15T00%253A00%253A00.000Z

Oktakit::BadRequest: 400 - The date format in your query is not recognized. Please enter dates using the Internet Date/Time Format profile of ISO 8601.

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