Class HttpDataTransfer

java.lang.Object
org.eclnt.ccee.http.HttpDataTransfer

public class HttpDataTransfer extends Object
Utitlity functions around accessing other systems by http
  • Constructor Details

    • HttpDataTransfer

      public HttpDataTransfer()
  • Method Details

    • instance

      public static HttpDataTransfer instance()
    • initialize

      public static void initialize(HttpDataTransfer instance)
    • readUrlContentAsUTF8String

      public String readUrlContentAsUTF8String(String urlString, boolean withError)
    • readUrlContentAsUTF8String

      public String readUrlContentAsUTF8String(String urlString, String userName, String password, boolean withError)
    • readURLContent

      public byte[] readURLContent(String urlString, boolean withError)
    • readURLContent

      public byte[] readURLContent(String urlString, String userName, String password, boolean withError)
    • createHeaderBasicAuthentication

      public String createHeaderBasicAuthentication(String userName, String password)
      Creates the value for an HTTP Basic Authentication header. The result needs to be added to the request header with key "Authorization".
      Parameters:
      userName - The user name
      password - The password
      Returns:
      The value for the HTTP Basic Authentication header or null if userName or password is null
    • sendPost

      public byte[] sendPost(String url, String body, Map<String,String> headers)