Class ContentTypeHandler

java.lang.Object
v1.sulphurapi.handlers.http.ContentTypeHandler

public class ContentTypeHandler extends Object
  • Constructor Details

    • ContentTypeHandler

      public ContentTypeHandler()
      Constructor for ContentTypeHandler. Initializes the content type actions for handling different content types.
  • Method Details

    • calculateBody

      public String calculateBody(org.json.JSONObject content, String contentType)
      Prepare to calculate the body based on provided contentType. This method will run the appropriate method via Runnable interface
      Parameters:
      content - the map containing pairs of data to build the body of the caller
      contentType - the type to select the appropriate action to run
      Returns:
      the calculated body as a String