2

I have to create a WebAPI which fit the URL :
http://server/share/pa/repos?file=Ring#filter=path|/A6/ERE/50-001|
and get elements into pipes => "ERE" and "50-001"

I tried this :

[Route("share/pa/{*endUrl}")] [HttpGet] public HttpResponseMessage Sharing([FromUri] string endUrl) { } 

endUrl variable contains only "repos" and Request.RequestUri.Query contains only "?file=Ring"

Can you have an idea to get elements "ERE" and "50-001" or entire requested url ?

2
  • If you want to get the entire query string, then this is your answer Commented Oct 17, 2022 at 7:23
  • 1
    @MindSwipe not in this case, it isn't Commented Oct 17, 2022 at 7:27

1 Answer 1

4

Everything after the # (the fragment) is client-side only and never goes to the server. So no: you can't do that at the server; you can access and process it client-side if needed, though.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.