KintoClientTest.java 文件源码

java
阅读 20 收藏 0 点赞 0 评论 0

项目:kinto-http-java 作者:
@Test
public void testRequestWithoutCustomHeaders() {
    // GIVEN a fake url
    String remote = "https://fake.kinto.url";
    // AND a kintoClient
    KintoClient kintoClient = new KintoClient(remote);
    // AND an ENDPOINTS
    ENDPOINTS endpoint = ENDPOINTS.GROUPS;
    // WHEN calling request
    GetRequest request = kintoClient.request(endpoint);
    // THEN the root part is initialized
    assertThat(request.getUrl(), is(remote + "/buckets/{bucket}/groups"));
    // AND the get http method is used
    assertThat(request.getHttpMethod(), is(HttpMethod.GET));
    // AND the default headers are set
    assertThat(request.getHeaders(), is(defaultHeaders));
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号