Class RestRepository

java.lang.Object
org.qubership.atp.mia.repo.impl.RestRepository

@Repository public class RestRepository extends Object
  • Field Details

  • Constructor Details

    • RestRepository

      public RestRepository()
  • Method Details

    • sendRestRequest

      public CommandResponse sendRestRequest(Command command)
      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 HttpResponse and string representation if header CONTENT_TYPE is text.
      Throws:
      RuntimeException - if HttpEntity in httpResponse is not parsable.