Package org.opencastproject.util
Class HttpUtil
java.lang.Object
org.opencastproject.util.HttpUtil
Functions to support Apache httpcomponents.
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.http.client.methods.HttpGetstatic booleanisOk(org.apache.http.HttpResponse res) static org.apache.http.NameValuePairstatic org.apache.http.client.methods.HttpPoststatic org.apache.http.client.methods.HttpPostpost(org.apache.http.NameValuePair... formParams) waitForResource(TrustedHttpClient http, URI resourceUri, int expectedStatus, long timeout, long pollingInterval) Wait for a certain status of a resource.
-
Method Details
-
post
public static org.apache.http.client.methods.HttpPost post(org.apache.http.NameValuePair... formParams) -
post
public static org.apache.http.client.methods.HttpPost post(String uri, org.apache.http.NameValuePair... formParams) -
get
-
param
-
isOk
public static boolean isOk(org.apache.http.HttpResponse res) -
waitForResource
public static Either<Exception,Integer> waitForResource(TrustedHttpClient http, URI resourceUri, int expectedStatus, long timeout, long pollingInterval) Wait for a certain status of a resource.- Returns:
- either an exception or the status code of the last http response
-