ServiceResponse<T> Klasse

  • java.lang.Object
    • com.microsoft.bot.restclient.ServiceResponse<T>

Typparameter

T

der Typ der Antwort

public class ServiceResponse

Eine Instanz dieser Klasse enthält ein Antwortobjekt und eine unformatierte REST-Antwort.

Zusammenfassung zum Konstruktor

Konstruktor Beschreibung
ServiceResponse(T body, Response<ResponseBody> response)

Instanziieren Sie eine Dienst-Antwortinstanz mit einem Antwortobjekt und einer unformatierten REST-Antwort.

ServiceResponse(Response<Void> headResponse)

Instanziieren Sie einen DienstAntwortinstanz mit einer Antwort eines HEAD-Vorgangs.

Methodenzusammenfassung

Modifizierer und Typ Methode und Beschreibung
T body()

Ruft das Antwortobjekt ab.

retrofit2.Response<java.lang.Void> headResponse()

Ruft die unformatierte REST-Antwort von einem HEAD-Vorgang ab.

retrofit2.Response<okhttp3.ResponseBody> response()

Ruft die unformatierte REST-Antwort ab.

ServiceResponse<T> withBody(T body)

Legt das Antwortobjekt fest.

Geerbte Methoden von java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Details zum Konstruktor

ServiceResponse

public ServiceResponse(T body, Response response)

Instanziieren Sie eine ServiceResponse-Instanz mit einem Antwortobjekt und einer unformatierten REST-Antwort.

Parameter:

body - deserialisiertes Antwortobjekt
response - unformatierte REST-Antwort

ServiceResponse

public ServiceResponse(Response headResponse)

Instanziieren Sie eine ServiceResponse-Instanz mit einer Antwort von einem HEAD-Vorgang.

Parameter:

headResponse - unformatierte REST-Antwort eines HEAD-Vorgangs

Details zur Methode

body

public T body()

Ruft das Antwortobjekt ab.

Gibt zurück:

das Antwortobjekt. Null, wenn keins vorhanden ist.

headResponse

public Response headResponse()

Ruft die unformatierte REST-Antwort von einem HEAD-Vorgang ab.

Gibt zurück:

die unformatierte REST-Antwort eines HEAD-Vorgangs.

response

public Response response()

Ruft die unformatierte REST-Antwort ab.

Gibt zurück:

die unformatierte REST-Antwort.

withBody

public ServiceResponse withBody(T body)

Legt das Antwortobjekt fest.

Parameter:

body - das Antwortobjekt.

Gibt zurück:

das ServiceResponse-Objekt selbst

Gilt für: