Class HttpProtocol

    • Constructor Detail

      • HttpProtocol

        public HttpProtocol()
    • Method Detail

      • getProtocolOutput

        public ProtocolResponse getProtocolOutput​(String url,
                                                  Metadata md)
                                           throws Exception
        Description copied from interface: Protocol
        Fetches the content and additional metadata

        IMPORTANT: the metadata returned within the response should only be new additional, no need to return the metadata passed in.

        Specified by:
        getProtocolOutput in interface Protocol
        Parameters:
        url - the location of the content
        md - extra information
        Returns:
        the content and optional metadata fetched via this protocol
        Throws:
        Exception
      • addHeadersToRequest

        protected void addHeadersToRequest​(org.apache.http.client.methods.HttpRequestBase request,
                                           Metadata md)