Skip to content

Commit

Permalink
Better javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
igr committed Feb 21, 2022
1 parent 6ffbf33 commit 1472345
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main/java/jodd/http/HeadersMultiMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ protected HeadersMultiMap() {
}

/**
* Adds new header value. If existing value exist, it will be removed
* so the store the new key value.
* Adds new header value. Allows multiple values for the same name.
*/
public void addHeader(final String name, final String value) {
List<String> valuesList = super.getAll(name);
Expand All @@ -48,10 +47,16 @@ public void addHeader(final String name, final String value) {
super.addAll(name, valuesList);
}

/**
* Sets the header value. Existing value will bee replaces.
*/
public void setHeader(final String name, final String value) {
super.set(name, value);
}

/**
* Returns header value. In case of multiple values, returns only the first value.
*/
public String getHeader(final String name) {
return super.get(name);
}
Expand Down

0 comments on commit 1472345

Please sign in to comment.