I'm trying to create an app with a login page to POST to a url and return a status code. For now the app is to call a URL that returns a HTTP 204 or HTTP 403 response. How is this done? Do I need to create/implement a servlet?
how can I create a URL/site to send a HTTP 204 or HTTP 403 response?
254 views Asked by matcha At
2
There are 2 answers
0

You certainly can implement your own web service to return those HTTP responses.
For testing your app you can use services like httpbin.org
For example: To get a 403 response, simply send a request to http://httpbin.org/status/403
Created a servlet using Maven/Eclipse/Tomcat and used HttpServletResponse