Skip to main content
Skip table of contents

readResponse

Versionshinweise

19.1

Code

GROOVY
String RestUtils.readResponse(Response response);
T RestUtils.readResponse(Response response, Class<T> type)

Beschreibung

Liest den Antwort-Stream als angegebenen Tpy mittels einem javax.ws.rs.ext.MessageBodyReader, der den Typ unterstützt.

Parameter

  • response - Die auszulesende Antwort.

  • type - Optionaler Parameter: Der Typ des Antwort-Objektes. Falls kein Typ angebenen wird, wird String genutzt.

Rückgabe

Die Antwort als JSON-String oder als Typ T, falls angegeben.

Beispiele

GROOVY
Person person = RestUtils.readResponse(response, Person.class);

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.