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
I am passing in users names in a first.last format and using a GET method to query information out of a table. When I pass in a username that does not have a period/dot in it it seems to work just fine.
I get back a result like the following:
"errorMessage": "No view function for: GET - /customers/00012345/users/first.last"
I am structuring the decorator like this:
@app.get('/customers/string:customer_id/users/string:user_name', cors=True)
Initially I did not specify a string for the arguments, but I had hoped that adding the 'string' in with it would tell it to accept exactly what it received.
The text was updated successfully, but these errors were encountered:
I considered that section you posted as well as at least part of the culprit. I attempted a regex also, but I did not alter what was in the examples. Your regex solution does seem to get the job done though!
That said, should I consider using FastAPI if your intent is to stop maintaining this?
I am passing in users names in a first.last format and using a GET method to query information out of a table. When I pass in a username that does not have a period/dot in it it seems to work just fine.
I get back a result like the following:
"errorMessage": "No view function for: GET - /customers/00012345/users/first.last"
I am structuring the decorator like this:
@app.get('/customers/string:customer_id/users/string:user_name', cors=True)
Initially I did not specify a string for the arguments, but I had hoped that adding the 'string' in with it would tell it to accept exactly what it received.
The text was updated successfully, but these errors were encountered: