@Incubating
@RecordType
class HttpResult
extends Object
Simple response wrapper for the HttpBuilder DSL.
status - the HTTP status codebody - the buffered response bodyheaders - the response headersraw - the underlying JDK response| Type | Name and description |
|---|---|
String |
body |
HttpHeaders |
headers |
HttpResponse<String> |
raw |
int |
statusSimple response wrapper for the HttpBuilder DSL. |
| Constructor and description |
|---|
HttpResult(HttpResponse<String> response)Creates a result wrapper from a JDK HTTP response. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
Object |
getHtml()Parses the buffered body as HTML using jsoup when available. |
|
Object |
getJson()Parses the buffered body as JSON. |
|
Object |
getParsed()Parses the buffered body according to the Content-Type header when possible. |
|
Object |
getXml()Parses the buffered body as XML. |
Simple response wrapper for the HttpBuilder DSL.
status - the HTTP status codebody - the buffered response bodyheaders - the response headersraw - the underlying JDK responseCreates a result wrapper from a JDK HTTP response.
response - the response to wrapParses the buffered body as HTML using jsoup when available.
Parses the buffered body as JSON.
Parses the buffered body according to the Content-Type header when possible.
Parses the buffered body as XML.
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.