Class BlazingRequest

java.lang.Object
blazing.https.BlazingRequest

public class BlazingRequest extends Object
  • Constructor Details

    • BlazingRequest

      public BlazingRequest()
  • Method Details

    • post

      public static Result<String,IOException> post(String url, Map<?,?> args)
      Sends a POST request to the target url with the args as a payload. The default content type is "application/x-www-form-urlencoded; charset=UTF-8"
      Parameters:
      url -
      args -
      Returns:
      a Result Object that contains the data response or an IOException if there was an error. Status 404 is also an error.
    • post

      public static Result<String,IOException> post(String url, String args)
      Sends a POST request to the target url with the args string as a payload. The default content type is "application/x-www-form-urlencoded; charset=UTF-8"
      Parameters:
      url -
      args -
      Returns:
      a Result Object that contains the data response or an IOException if there was an error. Status 404 is also an error.
    • post

      public static Result<String,IOException> post(String url, String content_type, Map<?,?> args)
      Sends a POST request to the target url with the args as a payload and allows for a specific content type
      Parameters:
      url -
      content_type -
      args -
      Returns:
      a Result Object that contains the data response or an IOException if there was an error. Status 404 is also an error.
    • post

      public static Result<String,IOException> post(String url, String content_type, String args)
      Sends a POST request to the target url with the args string as a payload and allows for a specific content type
      Parameters:
      url -
      content_type -
      args -
      Returns:
      a Result Object that contains the data response or an IOException if there was an error. Status 404 is also an error.
    • put

      public static Result<String,IOException> put(String url, Map<?,?> args)
      Sends a PUT request to the target url with the args as a payload. The default content type is "application/x-www-form-urlencoded; charset=UTF-8"
      Parameters:
      url -
      args -
      Returns:
      a Result Object that contains the data response or an IOException if there was an error. Status 404 is also an error.
    • put

      public static Result<String,IOException> put(String url, String content_type, Map<?,?> args)
      Sends a PUT request to the target url with the args as a payload and allows for a specific content type
      Parameters:
      url -
      content_type -
      args -
      Returns:
      a Result Object that contains the data response or an IOException if there was an error. Status 404 is also an error.
    • delete

      public static Result<String,IOException> delete(String url)
      Sends a DELETE request to the target url
      Parameters:
      url -
      Returns:
      a Result Object that contains the data response or an IOException if there was an error. Status 404 is also an error.
    • get

      public static Result<String,IOException> get(String urlString)
      Sends a GET request to the target url
      Parameters:
      url -
      Returns:
      a Result Object that contains the data response or an IOException if there was an error. Status 404 is also an error.
    • patch

      public static Result<String,IOException> patch(String url, Map<?,?> args)
      Sends a PATCH request to the target url with the args as a payload. The default content type is "application/x-www-form-urlencoded; charset=UTF-8"
      Parameters:
      url -
      args -
      Returns:
      a Result Object that contains the data response or an IOException if there was an error. Status 404 is also an error.
    • patch

      public static Result<String,IOException> patch(String url, String content_type, Map<?,?> args)
      Sends a PATCH request to the target url with the args as a payload and allows for a specific content type
      Parameters:
      url -
      content_type -
      args -
      Returns:
      a Result Object that contains the data response or an IOException if there was an error. Status 404 is also an error.
    • head

      public static Result<String,IOException> head(String urlString)
      Sends a HEAD request to the target url
      Parameters:
      url -
      Returns:
      a Result Object that contains the data response or an IOException if there was an error. Status 404 is also an error.