core/src/main/java/net/typedrest/AbstractEndpoint.java
protected HttpResponse executeAndHandle(Request request)
            throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException, IllegalStateException {
        HttpResponse response = execute(request);
        handleResponse(response, request);
        return response;
    }
protected HttpResponse executeAndHandle(Request request)
            throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException, IllegalStateException {
        HttpResponse response = execute(request);
        handleResponse(response, request);
        return response;
    }
protected HttpResponse executeAndHandle ( Request request ) throws IOException , IllegalArgumentException , IllegalAccessException , FileNotFoundException , IllegalStateException { HttpResponse response = execute ( request ) ; handleResponse ( response , request ) ; return response ; }
Executes a REST request and wraps HTTP status codes in appropriate
{@link Exception} types.

@param request The request to execute.
@return The HTTP response to the request.

@throws IOException Network communication failed.
@throws IllegalArgumentException {@link HttpStatus#SC_BAD_REQUEST}
@throws IllegalAccessException {@link HttpStatus#SC_UNAUTHORIZED} or
{@link HttpStatus#SC_FORBIDDEN}
@throws FileNotFoundException {@link HttpStatus#SC_NOT_FOUND} or
{@link HttpStatus#SC_GONE}
@throws IllegalStateException
{@link HttpStatus#SC_CONFLICT}, {@link HttpStatus#SC_PRECONDITION_FAILED}
or {@link HttpStatus#SC_REQUESTED_RANGE_NOT_SATISFIABLE}
@throws RuntimeException Other non-success status code.
Executes a REST request and wraps HTTP status codes in appropriate { @link Exception } types .