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
1.Improper handling of form information
2.The form contains a file and the form field contains the same field
3.request.json()Method serializes the result of a list field when the string of the list is not the list object,But expected when using orjson.loads(request.body) results
4.The form contains files, and the corresponding fields cannot be obtained, and only the file name and file stream can be obtained
I got headers included"content-type": ["application/x-www-form-urlencoded"],But the value I get when I use the request.form_data is{},request.body can obtain the original request value
2. For question 2, I use the following client code to make a request:
Now form_data I can try to get the value of type dict, but he only has the value of the last element in the list field{'title': '11', 'job_url': '11', 'display_env': 'version', 'robot_webhook': 'http://aa', 'build_num': '1'},request.body contains all the values, but there is no field identifier and cannot be extracted
3. For question 3, I use the following client code to make a request,At the same time, the annotation of the request.json() method on the server side is removed:
The resulting list field is a string object containing the contents of the list rather than the list object{'field': '["a","b","c"]', 'title': 'xxxx'}, but the expected result {'title': 'xxxx', 'field': ['a', 'b', 'c']} can be obtained by using orjson.loads(request.body)
4. For question 4, I use the following client code to make a request:
When I use the same request as question 2 to get request.files, I can't get the field name json and only the file name .report.json and file contents<class 'bytes'>
Your operating system
Linux
Your Python version (python --version)
3.12
Your Robyn version
latest
Additional Info
I hope the above feedback can be answered, whether it is a problem I use or a bug in the framework
The text was updated successfully, but these errors were encountered:
Bug Description
1.Improper handling of form information
2.The form contains a file and the form field contains the same field
3.
request.json()
Method serializes the result of a list field when the string of the list is not the list object,But expected when usingorjson.loads(request.body)
results4.The form contains files, and the corresponding fields cannot be obtained, and only the file name and file stream can be obtained
Steps to Reproduce
This is a sample server-side code
I got headers included
"content-type": ["application/x-www-form-urlencoded"]
,But the value I get when I use therequest.form_data
is{}
,request.body
can obtain the original request value2. For question 2, I use the following client code to make a request:
Now
form_data
I can try to get the value of type dict, but he only has the value of the last element in the list field{'title': '11', 'job_url': '11', 'display_env': 'version', 'robot_webhook': 'http://aa', 'build_num': '1'}
,request.body
contains all the values, but there is no field identifier and cannot be extracted3. For question 3, I use the following client code to make a request,At the same time, the annotation of the
request.json()
method on the server side is removed:The resulting list field is a string object containing the contents of the list rather than the list object
{'field': '["a","b","c"]', 'title': 'xxxx'}
, but the expected result{'title': 'xxxx', 'field': ['a', 'b', 'c']}
can be obtained by usingorjson.loads(request.body)
4. For question 4, I use the following client code to make a request:
When I use the same request as question 2 to get
request.files
, I can't get the field namejson
and only the file name.report.json
and file contents<class 'bytes'>
Your operating system
Linux
Your Python version (
python --version
)3.12
Your Robyn version
latest
Additional Info
I hope the above feedback can be answered, whether it is a problem I use or a bug in the framework
The text was updated successfully, but these errors were encountered: