Interface HttpResponseBuilder

All Superinterfaces:
HttpMessageBuilder<HttpResponseBuilder,HttpResponse>

@Experimental @NoImplement @MinMuleVersion("4.10.0") public interface HttpResponseBuilder extends HttpMessageBuilder<HttpResponseBuilder,HttpResponse>
Builder of HttpResponses. Instances can only be obtained using HttpService.responseBuilder() or HttpService.responseBuilder(HttpResponse). By default, the status code is 200 with empty reason phrase, headers, and entity.
Since:
0.12.0
  • Method Details

    • statusCode

      HttpResponseBuilder statusCode(Integer statusCode)
      Parameters:
      statusCode - the HTTP status line code desired for the HttpResponse
      Returns:
      this builder
    • reasonPhrase

      HttpResponseBuilder reasonPhrase(String reasonPhrase)
      Parameters:
      reasonPhrase - the HTTP status line reason phrase desired for the HttpResponse
      Returns:
      this builder
    • getStatusCode

      int getStatusCode()
      Returns:
      the current status code configured in the builder.
    • getReasonPhrase

      String getReasonPhrase()
      Returns:
      the current reason phrase configured in the builder.