-
Notifications
You must be signed in to change notification settings - Fork 380
Description
This is a follow-up to this issue @calavera
I had a new idea while reading closely the Payload format Version 2.0. There is a rawQueryString field! This means we can use this field to correctly parse query parameters into a QueryMap.
The lambda_http crate already appends this raw_query_string into the Uri of the request (as seen in the function request::into_api_gateway_v2_request), and the wrong QueryStringParameters are put inside an extension of the request.
So my idea is... maybe we can also expose theraw_query_string in some way but already parsed into a QueryMap. Something like an extension that can be accessed through the RequestExt trait. My reasoning is that most people using API Gateway expect the QueryStringParameters to behave according to the whatwg spec.
Maybe we can put a warning about this weird quirk of AWS in the documentation of RequestExt::query_string_parameters and push devs to use a new method like raw_query_string.