Optional Query Params and composed data

Viewed 29

I'm trying to figure it out how to build a query string with some important information to be fetched. For example, I have this struct I'm going to decode the query into:

SomeObject{
  Names []string
  Attr  Attribute  
}
Atribute{
  Group string 
  City      string
}

So, initially I understand passing the names in the query string should look like this:

HTTP://localhost:8000/api/retrieve?names=oneName&names=anotherName

And I can get the names[oneName anotherName] correctly. But now I must build the query to get the attributes in order to get: attributes{group{someGroup} city{Delhi}}. How should the query string be written????

Question it's not related to the HTTP request handlers, but how the params should look to get correctly

Thanks in advance

0 Answers
Related