I can send a request to my RestApi with curl but I cannot reach service from browser
I have a rest-api written in Java.
When I run my project by java -jar xx.jar command and send a curl request as “curl -X GET ”http://mysitename:8084/metadata/city/34“ -H "accept: application/json;charset=UTF-8” it works.
But when I enter same address as “http://mysitename:8084/metadata/city/34” to browser, it does not respond and gives this error: “mysitename’s server IP address could not be found”.
I also have swagger dependencies on my pom.xml and “http://mysitename:8084/swagger-ui.html” does not respond also.
So, any help would be very much appreciated.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×