I got a Web Api project, and I want to call a api controller through this URL:
Http://localhost:3030/GetByCoordinates/[[0,1],[1,1],[1,0],[0,0]]
It works fine, but when I try to add a double number (like 1.1 instead of 1) the browser throws 404 not found exception, because the dot make it look like another address.
How can i handle doubles ?
Try adding '/' at the end of the URL, e.g.
Http://localhost:3030/GetByCoordinates/[[0,1],[1,1.1],[1,0],[0,0]]/
Reference: Why is my Web API method with double args not getting called?
This isn't strictly the query string, but unless you can configure your MVC project (or, more specifcally, probably IIS) to allow/manage certain mappings (or not to manage them, in a given case perhaps) then you should be able to translate the character from one form to another.
That is, you could swap periods out for %2E
, and swap them back in on the server side.