Hello 👋🏻
Apologies if this is intended behavior or if I am just using the library wrongly.
I have created a `POST` endpoint whose body is an array, like this:
[
{
"prop1": "1",
"prop2": "2"
},
{
"prop1": "a",
"prop2": "b"
}
]
when I tried to access the @_request.params, it threw me the following error: TypeError: no implicit conversion of Array into Hash. The stack trace led me to the line 469 of the rack/request.rb file, so I am not really sure if this is an issue with `rack` or `roda` though.
The code where the bug happens is as follows:
def params
self.GET.merge(self.POST)
end
I presumed this happens because self.POST is an Array, and merge receives a Hash as an argument, so the exception is thrown.
I did a workaround, like this:
begin
params = @_request.params
rescue StandardError
params = @_request.POST
end
But I am not sure this is the right thing to do. Any clues here?