public HttpRequest any(int method,String endpoint, JsonArray array){
        switch (method) {
            case HttpRequest.GET:
                return get(endpoint);
            case HttpRequest.POST:
                return post(endpoint, array);
            case HttpRequest.PUT:
                return put(endpoint, array);
            case HttpRequest.DELETE:
                return delete(endpoint,array);
            case HttpRequest.PATCH:
                throw new UnsupportedOperationException("method not supported");
            default:
                throw new IllegalArgumentException("method is not valid");
        }
    }
public HttpRequest any ( int method , String endpoint , JsonArray array ) { switch ( method ) { case HttpRequest . GET : return get ( endpoint ) ; case HttpRequest . POST : return post ( endpoint , array ) ; case HttpRequest . PUT : return put ( endpoint , array ) ; case HttpRequest . DELETE : return delete ( endpoint , array ) ; case HttpRequest . PATCH : throw new UnsupportedOperationException ( "method not supported" ) ; default : throw new IllegalArgumentException ( "method is not valid" ) ; } }
-------------------------- OTHER METHODS --------------------------