Skip to content

Commit

Permalink
feat: added javadocs
Browse files Browse the repository at this point in the history
  • Loading branch information
mebo4b committed Dec 2, 2020
1 parent 6f4e05b commit c8b11f1
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,22 @@
import lombok.AllArgsConstructor;
import org.springframework.http.HttpHeaders;

/**
* Constants to build custom http headers.
*/
@AllArgsConstructor
public enum CustomHttpHeader {

QUOTA_REACHED("X-Reason", "QUOTA_REACHED");

private String headerName;
private String headerValue;
private final String headerName;
private final String headerValue;

/**
* Builds the {@link HttpHeaders} for the custom values.
*
* @return the {@link HttpHeaders} instance
*/
public HttpHeaders buildHeader() {
HttpHeaders headers = new HttpHeaders();
headers.add(headerName, headerValue);
Expand Down

0 comments on commit c8b11f1

Please sign in to comment.