Package jetbrains.buildServer.http
Class FakeHttpApi
- java.lang.Object
-
- jetbrains.buildServer.http.FakeHttpApi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFakeHttpApi.NotFoundstatic classFakeHttpApi.SimpleResponse-
Nested classes/interfaces inherited from interface jetbrains.buildServer.http.HttpApi
HttpApi.HeaderPair, HttpApi.Response
-
-
Constructor Summary
Constructors Constructor Description FakeHttpApi()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBlockedUri(String path)voidaddCookie(String cookieName, String cookieValue, String domain, int maxAgeSeconds)voidaddNotFoundPath(String path)voidaddOneTimePredefinedResponse(String path, HttpApi.Response response)voidaddPredefinedResponse(String path, HttpApi.Response response)voidbreakConnectionAfterCurrentRequestsEnd()voidbreakConnectionImmediately()voidclearPredefinedResponses()HttpApi.Responseget(String uri, HttpApi.HeaderPair... headers)StringgetCookieValue(String cookieName)HttpApi.Responsepost(String uri, String body, String contentType, String charset, HttpApi.HeaderPair... headers)voidresetCookies()voidrestoreConnection()voidsetDelegate(HttpApi delegate)
-
-
-
Method Detail
-
setDelegate
public void setDelegate(@NotNull HttpApi delegate)
-
get
@NotNull public HttpApi.Response get(@NotNull String uri, @NotNull HttpApi.HeaderPair... headers) throws IOException
- Specified by:
getin interfaceHttpApi- Throws:
IOException
-
post
@NotNull public HttpApi.Response post(@NotNull String uri, @NotNull String body, @NotNull String contentType, @NotNull String charset, @NotNull HttpApi.HeaderPair... headers) throws IOException
- Specified by:
postin interfaceHttpApi- Throws:
IOException
-
addCookie
public void addCookie(@NotNull String cookieName, @NotNull String cookieValue, @NotNull String domain, int maxAgeSeconds)
-
resetCookies
public void resetCookies()
-
breakConnectionImmediately
public void breakConnectionImmediately()
-
breakConnectionAfterCurrentRequestsEnd
public void breakConnectionAfterCurrentRequestsEnd()
-
addBlockedUri
public void addBlockedUri(@NotNull String path)
-
addNotFoundPath
public void addNotFoundPath(@NotNull String path)
-
addPredefinedResponse
public void addPredefinedResponse(@NotNull String path, @NotNull HttpApi.Response response)
-
addOneTimePredefinedResponse
public void addOneTimePredefinedResponse(@NotNull String path, @NotNull HttpApi.Response response)
-
clearPredefinedResponses
public void clearPredefinedResponses()
-
restoreConnection
public void restoreConnection()
-
-