요약
#995 RequestBuilder에 HTTP HEAD를 추가합니다.
내용
feat(Core): Add HTTP HEAD method to RequestBuilder
Rich Ellis
Summary
Add the HTTP HEAD method to com.ibm.watson.developer_cloud.http.RequestBuilder, which did not include it.
Added two new tests:
Rich Ellis
Summary
Add the HTTP HEAD method to com.ibm.watson.developer_cloud.http.RequestBuilder, which did not include it.
Added two new tests:
- RequestBuilderTest#testHead() to check we can build a head request
- ResponseTest#testExecuteWithDetailsForHead() to validate that the headers can be retrieved from the Response when using the head method.
Other Information
There is a slight weirdness in the test's header assertion assertEquals(expectedHeaders, actualHeaders) appears not to work because the underlying Headers class equality fails-I believe the MockWebServer and the Headers. of(...) methods different whitespace in the Headers object. Calling toString() on both objects produces identical strings that do pass an equals assertion.
You can view, comment on, or merge this pull request online at:
Commit Summary
- feat(Core): Add HTTP HEAD method to RequestBuiler
File Changes
Codecov Report
Merging #995 into master will decrease coverage by 23.71%.
The diff coverage is 100%
...
Merging #995 into master will decrease coverage by 23.71%.
The diff coverage is 100%
...
Coday Bot
Here is an overview of what got changed by this pull request:
Here is an overview of what got changed by this pull request:
Complexity increasing per file ============================== - core/src/main/java/com/ibm/watson/developer_cloud/http/ RequestBuilder.java 1 Clones removed ============== + core/src/test/java/com/ibm/ watson/developer_cloud/ service/ResponseTest.java -1
See the complete overview on Codacy.
German Attanasio
@germanattanasio approved this pull request.
@germanattanasio approved this pull request.
Logan Patino
This looks good to me I'll merge it in and it'll be included in the next release.
Thanks for the contribution!
This looks good to me I'll merge it in and it'll be included in the next release.
Thanks for the contribution!
해석
feat(Core): RequestBuilder에 HTTP HEAD를 추가합니다.
Rich Ellis
개요
HTTP HEAD method가 com.ibm.watson.developer_cloud.http.RequestBuilder 에 포함되지 않아 추가합니다.
두 개의 새로운 tests를 추가:
기타 정보
Rich Ellis
개요
HTTP HEAD method가 com.ibm.watson.developer_cloud.http.RequestBuilder 에 포함되지 않아 추가합니다.
두 개의 새로운 tests를 추가:
- RequestBuilderTest#testHead() head를 build할 수 있는지 확인합니다.
- ResponseTest#testExecuteWithDetailsForHead() head method를 사용할 때, 응답에서 헤더를 검색할 수 있는지 확인합니다.
기타 정보
test의 header assertion에 약간 이상한 점이 있습니다. assertEquals(expectedHeaders, actualHeaders)가 기본 헤더 클래스 동등성이 실패하기 때문에 작동하지 않습니다 - I MockWebServer와 Header 때문이라 생각합니다. of(...) method가 Header 객체의 각기 다른 공백을 처리합니다. 두 Header 객체에서 toString()을 호출하면 같은 assertion을 전달하는 동일한 문자열이 생성됩니다.
댓글 없음:
댓글 쓰기