Package com.xceptance.xlt.api.engine

# Class NetworkData

java.lang.Object
com.xceptance.xlt.api.engine.NetworkData

public class NetworkData extends Object
The `NetworkData` class holds a certain web request and the corresponding web response if there was any.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `NetworkData(WebRequest request, WebResponse response)`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Map<String,String>`
  `getAdditionalRequestHeaders()`
  Returns the additional request HTTP headers.
  `String`
  `getContentAsString()`
  Returns the response content.
  `String`
  `getContentType()`
  Returns the content type of the response.
  `WebRequest`
  `getRequest()`
  Returns the underlying request object for direct access.
  `String`
  `getRequestBody()`
  Returns the request body.
  `HttpMethod`
  `getRequestMethod()`
  Returns the request method.
  `List<NameValuePair>`
  `getRequestParameters()`
  Returns the request parameters.
  `WebResponse`
  `getResponse()`
  Returns the underlying response object for direct access.
  `List<NameValuePair>`
  `getResponseHeaders()`
  Returns the response HTTP headers.
  `int`
  `getResponseStatusCode()`
  Returns the response status code.
  `String`
  `getResponseStatusMessage()`
  Returns the response status message.
  `URL`
  `getURL()`
  Returns the request URL.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### NetworkData

    public NetworkData(WebRequest request, WebResponse response)
    Constructor.
    Parameters:
      `request` - the request
      `response` - the response (may be `null`)

- ## Method Details

  - ### getRequestMethod

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

  - ### getRequestBody

    public String getRequestBody()
    Returns the request body.
    Returns:
      the request body

  - ### getRequestParameters

    public List<NameValuePair> getRequestParameters()
    Returns the request parameters.
    Returns:
      the request parameters

  - ### getAdditionalRequestHeaders

    public Map<String,String> getAdditionalRequestHeaders()
    Returns the additional request HTTP headers.
    Returns:
      the additional request HTTP headers

  - ### getContentAsString

    public String getContentAsString()
    Returns the response content.
    Returns:
      the response content

  - ### getContentType

    public String getContentType()
    Returns the content type of the response.
    Returns:
      the content type of the response

  - ### getResponseStatusMessage

    public 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 List<NameValuePair> getResponseHeaders()
    Returns the response HTTP headers.
    Returns:
      the response HTTP headers

  - ### getURL

    public 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