Class HttpResponse

java.lang.Object
org.basex.util.http.HttpResponse

public final class HttpResponse extends Object
HTTP response handler. Reads HTTP response and constructs the <http:response/> element.
Author:
BaseX Team 2005-21, BSD License, Rositsa Shadura
  • Constructor Details

    • HttpResponse

      public HttpResponse(InputInfo info, MainOptions options)
      Constructor.
      Parameters:
      info - input info
      options - database options
  • Method Details

    • getResponse

      public Value getResponse(HttpURLConnection conn, boolean body, String mtype) throws IOException, QueryException
      Constructs http:response element and reads HTTP response content.
      Parameters:
      conn - HTTP connection
      body - also return body
      mtype - media type provided by the user (can be null)
      Returns:
      result sequence of http:response and content items
      Throws:
      IOException - I/O Exception
      QueryException - query exception