<PackageReference Include="Relativity.Server.Testing.Framework.Api.SDK" Version="10.3.0" />

IHttpService

public interface IHttpService
Represents the HTTP service that provides a set of methods to communicate with Relativity REST API.
string BaseUrl { get; }

Gets the base URL address.

string Username { get; }

Gets the username.

TResult Delete<TResult>(string relativeUri, object content = null, UserCredentials userCredentials = null)

Executes a DELETE HTTP request to the specified relativeUri with optionally content serialized to JSON, then deserializes the response content to TResult and returns it.

void Delete(string relativeUri, object content = null, UserCredentials userCredentials = null)

Executes a DELETE HTTP request without response to the specified relativeUri with optionally content serialized to JSON.

TResult Get<TResult>(string relativeUri, UserCredentials userCredentials = null)

Executes a GET HTTP request to the specified relativeUri, then deserializes the response content to TResult and returns it.

TResult Post<TResult>(string relativeUri, object content = null, double timeout = 2, UserCredentials userCredentials = null)

Executes a POST HTTP request to the specified relativeUri with optionally content serialized to JSON, then deserializes the response content to TResult and returns it.

void Post(string relativeUri, object content = null, UserCredentials userCredentials = null)

Executes a POST HTTP request without response to the specified relativeUri with optionally content serialized to JSON.

TResult Put<TResult>(string relativeUri, object content = null, UserCredentials userCredentials = null)

Executes a PUT HTTP request to the specified relativeUri with optionally content serialized to JSON, then deserializes the response content to TResult and returns it.

void Put(string relativeUri, object content = null, UserCredentials userCredentials = null)

Executes a PUT HTTP request without response to the specified relativeUri with optionally content serialized to JSON.