Class StringRequest


public class StringRequest extends ServiceRequest<String>
Author:
Andrea Di Cesare <andrea@softinstigate.com>
  • Method Details

    • init

      public static StringRequest init(io.undertow.server.HttpServerExchange exchange)
    • of

      public static StringRequest of(io.undertow.server.HttpServerExchange exchange)
    • parseContent

      public String parseContent() throws IOException, BadRequestException
      Description copied from class: ServiceRequest
      Parses the content from the exchange and converts it into an instance of the specified type T. This method retrieves data from the exchange, interprets it according to the expected format, and attempts to convert this data into an object of type T.
      Specified by:
      parseContent in class ServiceRequest<String>
      Returns:
      an instance of T representing the parsed content
      Throws:
      IOException - if an IO error occurs
      BadRequestException - if the content does not match the expected format for type T