0

I am trying to read full URL which comes with #params. How can i read in Play controller? I am able to read query parameters but not route directive

ex : https://x.app.com/callback#x=1

Action.async{ implicit request =>
     val fullUrl = ??? //Read full url of request
}

I tried request.uri and request.path. both are not helpful.

response of request.uri => /callback
response of request.path => /callback

There are no #params in the response.

Rajeev
  • 4,762
  • 8
  • 41
  • 63
  • Possible duplicate of [Can I read the hash portion of the URL on my server-side application (PHP, Ruby, Python, etc.)?](https://stackoverflow.com/questions/940905/can-i-read-the-hash-portion-of-the-url-on-my-server-side-application-php-ruby) – Tijkijiki Jun 18 '18 at 11:51

2 Answers2

0

you can use:

request.path 

or

request.uri
geek94
  • 443
  • 2
  • 11
0

You cant pass fragment (# part) to server, it is browser only. Use query parameter instead

Tijkijiki
  • 792
  • 7
  • 19