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

Web API array objects in the query string #59

Open
GwtLabs opened this issue Nov 30, 2020 · 0 comments
Open

Web API array objects in the query string #59

GwtLabs opened this issue Nov 30, 2020 · 0 comments

Comments

@GwtLabs
Copy link

GwtLabs commented Nov 30, 2020

Sending a GET request to the Web API with an array of parameters, e.g .:

GET {{url}}/check?archival=1&ids[0].type=gitid&ids[0].value=123456&ids[1].type=shortid&ids[1].value=d4a

The archival parameter is inserted into the object, the ids list is not.
Query object class looks like this:

    public class CheckIdentifiers : IQuery<CheckIdentifiersDto>
    {
        public IList<Identifier> Ids { get; set; }
        public bool Archival { get; set; }
    }

    public class Identifier
    {
        public string Type { get; set; }
        public string Value { get; set; }
    }
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