0

I'm trying to send an http request with / symbol.
For example: apiAddress/search/18/19. 18/19 is a search word.
But I every time get in controller only 18.

I understand that '/' symbol is special and it is parsed as part of the url, so I tried to encode it and send like 18%2F19 but it doesn't work too. My search method:

[Route("Search/{searchParam}"]
[HttpGet]
public Result Search(string search, ...){
//some code
}

Actual result: Search parameter contains only "18".

Expected result: Search parameter contains "18/19".

Buckethead
  • 213
  • 5
  • 14

0 Answers0