The following class can be used as a single class that can handle GET, POST, PUT, PATCH, and other requests:
class APIResponseObject{
    int responseCode;
    String response;
    APIResponseObject(int responseCode,String response)
    {
         this.responseCode = responseCode;
         ...