How to get ip and hostname of client


When client is initiating a request to access the restapi, i need them to pass the details of hostname and IP on the same resource of the url and capture it in the log. Please help me with the sample code.

(Sean Killian) #2

This might do what you want:

(Justin) #3

This post helps to get the IP address of a HTTP request, if i understood the question correctly.