• 试试这个

    filters((new Filter() {
    @Override
    public Response filter(FilterableRequestSpecification requestSpec, FilterableResponseSpecification responseSpec, FilterContext ctx) {
    Response response = ctx.next(requestSpec, responseSpec);

    String content=new String(response.getBody().asString());
    Response Response2 = new ResponseBuilder().clone(response).setContentType(ContentType.JSON).setBody(content).build();
    return Response2;
    }
    })