Class MethodFactory

java.lang.Object
ee.jakarta.tck.pages.common.client.http.MethodFactory

public class MethodFactory extends Object
Simple factory class which returns HttpMethod implementations based on a request line.

For example, a request line of GET /index.jsp HTTP/1.0 would return an HttpMethod implementation that handles GET requests using HTTP/1.0.

  • Method Details

    • getInstance

      public static org.apache.http.client.methods.HttpUriRequest getInstance(String requestLine)
      Returns the appropriate request sub-type based on the provided request string. The request must be in the format of an RFC 9112 request line e.g. GET /index.jsp HTTP/1.1.
      Parameters:
      requestLine - The request line
      Returns:
      HttpUriRequest based on the provided request line.