How can we know the name of the page or service or state of page which has called RESTful API in java file. Something like $state.current.name
in AngularJS.
I have created api's in java using @RequestMapping()
. In this java file I want to know about the name of page that has called this API. As I want to call same api on different pages and want to log different strings according to the page which has requested the API. I am using $http.get(api)
in AngularJS to call API.