Package org.qubership.atp.mia.repo.impl
Class RestRepository
java.lang.Object
org.qubership.atp.mia.repo.impl.RestRepository
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecuteScript(Rest rest, org.apache.http.HttpResponse httpResponse, String responseBody, String processName) Compute result of user script.getResponseBody(Command command, org.apache.http.HttpResponse httpResponse) Save HttpResponse in File and if it's text the string representation also returned.sendRestRequest(Command command) Sends rest request.
-
Field Details
-
HEADER_CONTENT_TYPE
- See Also:
-
HEADER_CONTENT_DISPOSITION
- See Also:
-
-
Constructor Details
-
RestRepository
public RestRepository()
-
-
Method Details
-
sendRestRequest
Sends rest request. -
executeScript
public String executeScript(Rest rest, org.apache.http.HttpResponse httpResponse, String responseBody, String processName) Compute result of user script. -
getResponseBody
protected Map.Entry<File,String> getResponseBody(Command command, org.apache.http.HttpResponse httpResponse) Save HttpResponse in File and if it's text the string representation also returned.- Parameters:
httpResponse- httpResponse- Returns:
- link to file with
HttpResponseand string representation if header CONTENT_TYPE is text. - Throws:
RuntimeException- ifHttpEntityinhttpResponseis not parsable.
-