Right now my API accepts a request such as ?a[]=x&a[]=y
using:
params do
requires :a, type: Array[String]
end
My client can only send the query parameter as ?a[0]=x&a[1]=y
which Grape does not understand, resulting in 400 (Bad Request).
Is it not possible to both accept a[]
and a[0]
with Grape? The other option is to send a request to another server first, converting from a[0]
to a[]
, send that request to Grape, get the response from Grape and send that to the client, which seems really unnecessary.