I am getting the exception
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 2 column 1 path $
when called a POST request.
According to this answer my json response do have the curly braces {}.
first my json response was-
{
    "status": {
        "status": "1",
        "message": "Entry inserted successfully"
    },
    "data": {
        "date": "24-Mar-2226",
        "month": "March",
        "party_name": "mark"
    }
}
then I combined the two separate objects in a single response object-
{
   "response": {
       "status": {
           "status": "1",
           "message": "Entry inserted successfully"
       },
       "data": {
           "date": "24-Mar-2226",
           "month": "March",
           "party_name": "mark"
       }
   }
}
but still I am getting the same error.
The GET request with retrofit is working fine but not the POST request.
This is my POST query-
  @POST("AddEntry")
    Call<ResponseClass> addMyEntry(@Body DetailsClass details);
 
     
    