.Net controller not receiving value in query string correctly

60 views Asked by At

I found that if my endpoint uses method Get with [FromQuery] then the input value is parsed incorrectly. Check my image below

My postman sent request enter image description here

My endpoint received the request enter image description here

the GetRecruitmentsRequest definition enter image description here

Query and QueryString enter image description here

enter image description here

As you can see, the Language field got the value "avanced", it was supposed to receive "advanced" though

I had met this issue before, however instead of facing it, I worked around by changing the method to Post and it worked. I guess this is a bug of .Net 6 (I am using this version) yet I haven't found any post about it

0

There are 0 answers