最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

java - Response is "None" when using Rest Assured for API automation (within organization) - Stack Overflow

programmeradmin4浏览0评论

Trying to start off API automation project for anization project

I am trying to automate a API case using RestAssured and started off with a simple test case - to get details. I am doing this in my anization.

When I hit the endpoint, I get response as "None"

Below is the code

RestAssured.proxy("company_proxy_url"); // without giving this, the call was not happening and execution was stuck.
Response response = RestAssured
    .given().baseUri(base_URI)
    .log().all()
    .header("Authorization", AUTH)
    .header("Content-Type","application/json")
    .when().get()
    .then()
    .extract().response();

The same hit using postman works perfectly fine.

Is there anything missing.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论