You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default FastAPI has compatibility for lists in query params using multiple duplicates of the same param, without extras: q=1&q=2&q=3, however many client libraries build list parameters into query params adding square brackets to the param name: q[]=1&q[]=2&q[]=3, and even declaring the index of the value inside it if the order of the elements is relevant: q[0]=1&q[1]=2&q[2]=3.
This serialization is not standardized by any RFC, but is widely supported by client libraries like axios, which by default uses the second method here described.
It would be useful to avoid repeating code to integrate this method of parsing directly into LogicLayerModule; this is possible by subclassing the fastapi.Request and fastapi.routing.APIRoute classes. Implementations can then customize their methods by subclassing these or declaring their own Route class on the internal router object.
The text was updated successfully, but these errors were encountered:
By default FastAPI has compatibility for lists in query params using multiple duplicates of the same param, without extras:
q=1&q=2&q=3
, however many client libraries build list parameters into query params adding square brackets to the param name:q[]=1&q[]=2&q[]=3
, and even declaring the index of the value inside it if the order of the elements is relevant:q[0]=1&q[1]=2&q[2]=3
.This serialization is not standardized by any RFC, but is widely supported by client libraries like
axios
, which by default uses the second method here described.It would be useful to avoid repeating code to integrate this method of parsing directly into LogicLayerModule; this is possible by subclassing the
fastapi.Request
andfastapi.routing.APIRoute
classes. Implementations can then customize their methods by subclassing these or declaring their own Route class on the internalrouter
object.The text was updated successfully, but these errors were encountered: