Skip to content

Response from 202 code in to JSON #2302

Open
@trinadhkoya

Description

@trinadhkoya

i want to convert the Response in to JSON and show it to the User .I was able to display 200 response but in 202,i am failed.

Gson gson = new Gson();
SuccessResponse signupResponse = response.body();
String sSignupResponse = gson.toJson(signUpResponse, SuccessResponse.class);
should i do the same for 202 too? i created another POJO like ErrorResponse with message and code ,replaced the SuccessRespone with ErrorResponse

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions