如何使用Rest Assured并使用requestSpecBuilder和Content-type ='application / x- ndjson '
来执行发布请求答案 0 :(得分:0)
像这样指定您的请求规范
RequestSpecBuilder builder = new RequestSpecBuilder();
builder.addHeader("Content-Type", "application/x-ndjson");
RequestSpecification reqspec = builder.build();
然后
given()。spec( reqspec )。when()。then()