I have created a web api with search option. For checking the api, i have used Postman tool in that i have provided symbols like "+", "#" for search. It is not recognized by the Web api Get method parameter.
From Postman Get Method() ->
http://localhost:60670/api/home?query=#
"query" is the parameter for search, in that i have given "+" or "#" keyword.
public IActionResult Get(string query)
But from the code it is not recognized by the Get method and "query" parameter is showing "null".
Help on this please!
few ways to do it:
1- encode your parameters : + --> %2B and # --> %23 (and any other special character) SEE : http://www.degraeve.com/reference/specialcharacters.php
2- send via POST instead of GET (I prefer this)
Encode your parameters:
original path = \Documents\FDS_D7U_C180175P+001005.pdf
encode path = %5C%20Documents%5CFDS_D7U_C180175P%2B001005.pdf

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With