Skip to content

Commit 8674b87

Browse files
committed
Extract HttpOpener default header values into constants. (#459)
Also fixes error introduced in fe7277c (default values were swapped).
1 parent 242178b commit 8674b87

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,17 @@ public final class HttpOpener extends DefaultObjectPipe<String, ObjectReceiver<R
5252
private static final String ACCEPT_HEADER = "accept";
5353
private static final String ENCODING_HEADER = "accept-charset";
5454

55+
private static final String ACCEPT_DEFAULT = "*/*";
56+
private static final String ENCODING_DEFAULT = "UTF-8";
57+
5558
private final Map<String, String> headers = new HashMap<>();
5659

5760
/**
5861
* Creates an instance of {@link HttpOpener}.
5962
*/
6063
public HttpOpener() {
61-
setAccept("UTF-8");
62-
setEncoding("*/*");
64+
setAccept(ACCEPT_DEFAULT);
65+
setEncoding(ENCODING_DEFAULT);
6366
}
6467

6568
/**

0 commit comments

Comments
 (0)