Package org.apache.juneau.rest.httppart
Class RequestHeader
java.lang.Object
org.apache.juneau.rest.httppart.RequestHttpPart
org.apache.juneau.rest.httppart.RequestHeader
- All Implemented Interfaces:
- Header,- NameValuePair
Represents a single header on an HTTP request.
 
 Typically accessed through the RequestHeaders class.
 
Some important methods on this class are:
- RequestHeader- Methods for retrieving simple string values:
- Methods for retrieving as other common types:
      - asBoolean()
- asBooleanHeader()
- asCsvArray()
- asCsvArrayHeader()
- asDate()
- asDateHeader()
- asEntityTagArrayHeader()
- asEntityTagHeader()
- asInteger()
- asIntegerHeader()
- asLong()
- asLongHeader()
- asMatcher(Pattern)
- asMatcher(String)
- asMatcher(String,int)
- asStringHeader()
- asStringRangeArrayHeader()
- asUriHeader()
 
- Methods for retrieving as custom types:
- Methods for performing assertion checks:
- Other methods:
 - See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionReturns the value of this header as aBasicBooleanHeader.Returns the value of this header as aBasicCsvHeader.Returns the value of this header as aBasicDateHeader.Returns the value of this header as aBasicEntityTagHeader.Returns the value of this header as aBasicEntityTagsHeader.Returns the value of this header as aBasicIntegerHeader.Returns the value of this header as aBasicLongHeader.Returns the value of this header as aBasicStringHeader.Returns the value of this header as aBasicStringRangesHeader.Returns the value of this header as aBasicUriHeader.Parses the value.parser(HttpPartParserSession value) Specifies the part parser to use for this part.schema(HttpPartSchema value) Specifies the part schema for this part.toString()Methods inherited from class org.apache.juneau.rest.httppart.RequestHttpPartas, as, as, asBoolean, asBooleanPart, asCsvArray, asCsvArrayPart, asDate, asDatePart, asInteger, asIntegerPart, asLong, asLongPart, asMatcher, asMatcher, asMatcher, assertCsvArray, assertDate, assertInteger, assertLong, assertString, asString, asStringPart, asUriPart, def, get, getName, getRequest, getValue, isPresent, orElseMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.http.NameValuePairgetName, getValue
- 
Constructor Details- 
RequestHeaderConstructor.- Parameters:
- request- The request object.
- name- The header name.
- value- The header value.
 
 
- 
- 
Method Details- 
asCsvHeaderReturns the value of this header as aBasicCsvHeader.- Returns:
- The value of this header as a  BasicCsvHeader, nevernull .
 
- 
asDateHeaderReturns the value of this header as aBasicDateHeader.- Returns:
- The value of this header as a BasicDateHeader, nevernull .
 
- 
asEntityTagsHeaderReturns the value of this header as aBasicEntityTagsHeader.- Returns:
- The value of this header as a BasicEntityTagsHeader, nevernull .
 
- 
asEntityTagHeaderReturns the value of this header as aBasicEntityTagHeader.- Returns:
- The value of this header as a BasicEntityTagHeader, nevernull .
 
- 
asIntegerHeaderReturns the value of this header as aBasicIntegerHeader.- Returns:
- The value of this header as a BasicIntegerHeader, nevernull .
 
- 
asBooleanHeaderReturns the value of this header as aBasicBooleanHeader.- Returns:
- The value of this header as a BasicBooleanHeader, nevernull .
 
- 
asLongHeaderReturns the value of this header as aBasicLongHeader.- Returns:
- The value of this header as a BasicLongHeader, nevernull .
 
- 
asStringRangesHeaderReturns the value of this header as aBasicStringRangesHeader.- Returns:
- The value of this header as a BasicStringRangesHeader, nevernull .
 
- 
asStringHeaderReturns the value of this header as aBasicStringHeader.- Returns:
- The value of this header as a BasicStringHeader, nevernull .
 
- 
asUriHeaderReturns the value of this header as aBasicUriHeader.- Returns:
- The value of this header as a BasicUriHeader, nevernull .
 
- 
getElementsParses the value.- Specified by:
- getElementsin interface- Header
- Returns:
- An array of HeaderElemententries, may be empty, but is nevernull .
- Throws:
- BasicHttpException- In case of a parsing error.
 
- 
toString- Overrides:
- toStringin class- RequestHttpPart
 
- 
schemaDescription copied from class:RequestHttpPartSpecifies the part schema for this part.Used by schema-based part parsers such as OpenApiParser.- Overrides:
- schemain class- RequestHttpPart
- Parameters:
- value- The part schema.
- Returns:
- This object.
 
- 
parserDescription copied from class:RequestHttpPartSpecifies the part parser to use for this part.If not specified, uses the part parser defined on the client by calling RestContext.Builder.partParser().- Overrides:
- parserin class- RequestHttpPart
- Parameters:
- value- The new part parser to use for this part.
 If- null ,- SimplePartParser.DEFAULTwill be used.
- Returns:
- This object.
 
 
-