Class HttpUtils

java.lang.Object
org.qubership.atp.tdm.utils.HttpUtils

public class HttpUtils extends Object
  • Constructor Details

    • HttpUtils

      public HttpUtils()
  • Method Details

    • buildFileResponseEntity

      public static org.springframework.http.ResponseEntity<org.springframework.core.io.InputStreamResource> buildFileResponseEntity(File file, String contentType) throws FileNotFoundException
      Building response entity containing file for download to user.
      Parameters:
      file - - formed file.
      contentType - - type of file.
      Returns:
      - response entity.
      Throws:
      FileNotFoundException - -if there is no such file.