Class NetworkData


  • public class NetworkData
    extends java.lang.Object
    The NetworkData class holds a certain web request and the corresponding web response if there was any.
    • Constructor Detail

      • NetworkData

        public NetworkData​(WebRequest request,
                           WebResponse response)
        Constructor.
        Parameters:
        request - the request
        response - the response (may be null)
    • Method Detail

      • getRequestMethod

        public HttpMethod getRequestMethod()
        Returns the request method.
        Returns:
        the request method
      • getRequestBody

        public java.lang.String getRequestBody()
        Returns the request body.
        Returns:
        the request body
      • getRequestParameters

        public java.util.List<NameValuePair> getRequestParameters()
        Returns the request parameters.
        Returns:
        the request parameters
      • getAdditionalRequestHeaders

        public java.util.Map<java.lang.String,​java.lang.String> getAdditionalRequestHeaders()
        Returns the additional request HTTP headers.
        Returns:
        the additional request HTTP headers
      • getContentAsString

        public java.lang.String getContentAsString()
        Returns the response content.
        Returns:
        the response content
      • getContentType

        public java.lang.String getContentType()
        Returns the content type of the response.
        Returns:
        the content type of the response
      • getResponseStatusMessage

        public java.lang.String getResponseStatusMessage()
        Returns the response status message.
        Returns:
        the response status message
      • getResponseStatusCode

        public int getResponseStatusCode()
        Returns the response status code.
        Returns:
        the response status code
      • getResponseHeaders

        public java.util.List<NameValuePair> getResponseHeaders()
        Returns the response HTTP headers.
        Returns:
        the response HTTP headers
      • getURL

        public java.net.URL getURL()
        Returns the request URL.
        Returns:
        the request URL
      • getRequest

        public WebRequest getRequest()
        Returns the underlying request object for direct access.
        Returns:
        the request
      • getResponse

        public WebResponse getResponse()
        Returns the underlying response object for direct access.
        Returns:
        the response