I've seen plenty on this regarding url rewrite rules et al, but the requested url doesn't make it to by endpoint.
request:
PUT http://api.host.com/item/{itemcode}
itemcode can be "B0015/A" for example.
I need to parse this as B0015/A not the route B0014/{SomeOtherUrl}.
So I figure that the routing is making things difficult and that I may not be able to get the %2f all the way down into the endpoint (please correct me if i'm wrong here).
Now I'm looking for other options. I don't think that an itemcodes have double slash ("//") so if there is a way I can have a params[] endpoint, that might work:
[Route("item/{itemcode:string[]}"]
public Task<IHttpActionResult> ThisWouldNeverReallyWork( params string[] p)
XD
any suggestions welcome. I'm quite stuck here atm
What I have tried:
I have already tried playing with URL rewrite:
<rewrite>
<rules useOriginalURLEncoding="true">
<rule name="UrlEncoding" >
<match url="^(https?://).*" />
<action type="Rewrite" url="{R:1}{HTTP_HOST}/{URL}" />
</rule>
</rules>
</rewrite>
My next move it to try to route the request manually, but that's gonna take a while.
Thanks
Andy