Package org.htmlunit

# Interface WebConnection

All Superinterfaces:
  `AutoCloseable`

All Known Implementing Classes:
  `DebuggingWebConnection`, `FalsifyingWebConnection`, `HttpWebConnection`, `MockWebConnection`, `WebConnectionWrapper`

public interface WebConnection extends AutoCloseable
An object which handles the actual communication portion of page retrieval/submission.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `WebResponse`
  `getResponse(WebRequest request)`
  Submits a request and retrieves a response.

- ## Method Details

  - ### getResponse

    WebResponse getResponse(WebRequest request) throws IOException
    Submits a request and retrieves a response.
    Parameters:
      `request` - the request
    Returns:
      the response to the request defined by the specified request
    Throws:
      `IOException` - if an IO error occurs

  - ### close

    void close() throws IOException
    Specified by:
      `close` in interface `AutoCloseable`
    Throws:
      `IOException`