Skip to content
This repository has been archived by the owner on Feb 6, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant