use of org.webpieces.httpparser.api.subparsers.AcceptType in project webpieces by deanhiller.
the class HeaderPriorityParserImpl method parseAcceptFromRequest.
@Override
public List<AcceptType> parseAcceptFromRequest(HttpRequest req) {
List<AcceptType> list = new ArrayList<>();
Header header = req.getHeaderLookupStruct().getHeader(KnownHeaderName.ACCEPT);
if (header == null)
return list;
String value = header.getValue();
return parsePriorityItems(value, s -> parseAcceptSubitem(s));
}
Aggregations