public class

HttpRequest

extends Object
java.lang.Object
   ↳ com.atlassian.confluence.it.web.HttpRequest

Class Overview

Provides authenticated raw HTTP access to Confluence URLs for testing.

Summary

Public Methods
static void execute(User user, HttpMethod method)
Executes the provided request.
static HttpRequest get(User user, String url)
Executes a GET on the provided URL.
String getResponseBody()
String getResponseHeader(String headerName)
int getStatusCode()
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static void execute (User user, HttpMethod method)

Executes the provided request. The method parameter will then contain information about the response.

Throws
IOException as documented by executeMethod(HttpMethod)

public static HttpRequest get (User user, String url)

Executes a GET on the provided URL. The returned HttpRequest object can be used to query information about the result.

Throws
RuntimeException if any problem occurs with the request, where the cause is any exception thrown by executeMethod(HttpMethod)

public String getResponseBody ()

public String getResponseHeader (String headerName)

public int getStatusCode ()