Skip to content

Using customGET with array parameter #1013

Closed
@rpungello

Description

@rpungello

I'm having a small issue with passing an array as a parameter to the customGET function.

Basically, if I call Restangular.all('resource').customGET('/', { 'foo[]': ['bar', 'baz'] }) the square brackets get encoded twice in the resulting URL ([ -> %5B -> %255B). This obviously causes issues with the backend processing.

However, the same concept works fine for the .get() and .getList() functions. If I pass in an array (using the [] syntax), it gets sent properly encoded.

Am I doing this right, or is there a better way (other than manually constructing the URL) to use an array as a parameter?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions