Closed mauriciojxs closed 9 years ago
I intentionally left out array support in querystrings and url-encoded as there is no accepted standard (and the generally used form doesn't match TODOist, so it probably wouldn't work anyways).
For you case, I would try the following:
Dim ResourceTypes As String
ResourceTypes = "[""" & Join(Array("projects"), """, """) & """]"
' or directly with "[""projects""]"
Request.AddQuerystringParam "resource_types", ResourceTypes
http://api.jquery.com/jquery.param/ (Includes notes and traditional
setting)
http://stackoverflow.com/questions/6243051/how-to-pass-an-array-within-a-query-string
In both the links you mention, there are references to arrays in the string. Is there an equivalent of the "serialize" in your library? Besides this [projects] call there are a number of other commands I should pass in the same format.
EDIT: sorry, just tested it and the "join" you proposed will work perfectly.
Hi Tim,
This is more a question than an issue with your code.
I successfully used your app with
Client.GetJson((Resource))
(while Resource is the string appended to the API URL) to get information from TODOist API. This is the posted URL:Now I'm trying to do the same, while making use of the WebRequest functions, but I'm stuck in the
resource_types=
parameter, as it asks for an array. I tried adding this to the body, instead of the querystring, but the API won't accept. Bottom line, is there a way to have arrays appended to the querystring, rather than the body? Below is a copy of the code that is NOT working:Thanks for any help with that! Mauricio