Skip to content

Commit 401babb

Browse files
committed
Update HttpOpener Accept-Encoding header setter. (#513)
1 parent 8a18b2a commit 401babb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

metafacture-io/src/main/java/org/metafacture/io/HttpOpener.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,11 @@ public void setEncoding(final String charset) {
197197
* Allowed values are i.a. "gzip" and "Brotli".
198198
* The default for the content encoding is null, which means "no compression".
199199
*
200-
* @param contentEncoding name of content encoding used for the accept-encoding HTTP
200+
* @param acceptEncoding name of content encoding used for the accept-encoding HTTP
201201
* header
202202
*/
203-
public void setAcceptContentEncoding(final String contentEncoding) {
204-
setHeader(ACCEPT_ENCODING_HEADER, contentEncoding);
203+
public void setAcceptEncoding(final String acceptEncoding) {
204+
setHeader(ACCEPT_ENCODING_HEADER, acceptEncoding);
205205
}
206206

207207
/**

metafacture-io/src/test/java/org/metafacture/io/HttpOpenerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ public void shouldPerformGetRequestWithErrorResponseAndWithoutErrorPrefixParamet
276276

277277
@Test
278278
public void shouldPerformGetRequestWithGzipedContentEncoding() throws IOException {
279-
shouldPerformRequest(TEST_URL, HttpOpener.Method.GET, (o, u) -> o.setAcceptContentEncoding("gzip"),
279+
shouldPerformRequest(TEST_URL, HttpOpener.Method.GET, (o, u) -> o.setAcceptEncoding("gzip"),
280280
null, null,
281281
WireMock.ok().withBody(GZIPPED_RESPONSE_BODY).withHeaders(new HttpHeaders(new HttpHeader(HttpOpener.CONTENT_ENCODING_HEADER,"gzip"))),
282282
RESPONSE_BODY);

0 commit comments

Comments
 (0)