Class HttpProtocol

    • Constructor Detail

      • HttpProtocol

        public HttpProtocol()
    • Method Detail

      • addHeadersToRequest

        protected void addHeadersToRequest​(okhttp3.Request.Builder rb,
                                           Metadata md)
      • getProtocolOutput

        public ProtocolResponse getProtocolOutput​(String url,
                                                  Metadata metadata)
                                           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.

        Parameters:
        url - the location of the content
        metadata - extra information
        Returns:
        the content and optional metadata fetched via this protocol
        Throws:
        Exception