Fixed client example with toEntity on field

ResponseField does not contain toEntity but ClientResponseField does
and is returned by response#field.

See gh-573
This commit is contained in:
Tony Marjakangas
2022-12-09 14:18:44 +01:00
committed by rstoyanchev
parent 3bee3e81cc
commit 608e4dd7e4

View File

@@ -282,7 +282,7 @@ For example:
// Request failure... <1>
}
ResponseField field = response.field("project");
ClientResponseField field = response.field("project");
if (!field.hasValue()) {
if (field.getError() != null) {
// Field failure... <2>
@@ -400,7 +400,7 @@ response directly:
// Request failure...
}
ResponseField field = response.field("project");
ClientResponseField field = response.field("project");
if (!field.hasValue()) {
if (field.getError() != null) {
// Field failure...