Class HTTPProxy


  • public class HTTPProxy
    extends Object
    Simple server-side HTTP Request / Response
    Author:
    davidc
    • Field Detail

      • url

        protected URL url
      • response

        protected javax.servlet.http.HttpServletResponse response
    • Constructor Detail

      • HTTPProxy

        public HTTPProxy​(String requestUrl,
                         javax.servlet.http.HttpServletResponse response)
                  throws MalformedURLException
        Construct
        Parameters:
        requestUrl - url to request
        response - response to write request back to
        Throws:
        MalformedURLException
    • Method Detail

      • initialiseResponse

        protected void initialiseResponse​(URLConnection urlConnection)
        Initialise response
        Parameters:
        urlConnection - url connection
      • setRequestHeaders

        protected void setRequestHeaders​(URLConnection urlConnection)
        Set request headers
        Parameters:
        urlConnection - url connection