Class HttpRequestHdr
java.lang.Object
org.apache.jmeter.protocol.http.proxy.HttpRequestHdr
The headers of the client HTTP request.
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionHttpRequestHdr(String httpSamplerName) HttpRequestHdr(String prefix, String httpSamplerName) HttpRequestHdr(String prefix, String httpSamplerName, int httpSampleNameMode, String format) 
- 
Method SummaryModifier and TypeMethodDescriptionintReturns the method string extracted from the first line of the client request.getMultipartConfig(String contentType) getPath()Find the /some/file.xxxx from http://server.ect:PORT/some/file.xxxgetProtocol(HTTPSamplerBase sampler) byte[]getUrl()Returns the url string extracted from the first line of the client request.getUrlWithoutQuery(URL url) booleanReturn true if automatic GraphQL Request detection is enabled.byte[]parse(InputStream in) Parses a http header from a stream.Find the //server.name from an url.intFind the :PORT from http://server.ect:PORT/some/file.xxxvoidsetDetectGraphQLRequest(boolean detectGraphQLRequest) Sets whether automatic GraphQL Request detection is enabled.
- 
Field Details- 
CONTENT_TYPE- See Also:
 
- 
CONTENT_LENGTH- See Also:
 
 
- 
- 
Constructor Details- 
HttpRequestHdrpublic HttpRequestHdr()
- 
HttpRequestHdr- Parameters:
- httpSamplerName- the http sampler name
 
- 
HttpRequestHdr- Parameters:
- prefix- Sampler prefix
- httpSamplerName- the http sampler name
 
- 
HttpRequestHdr- Parameters:
- prefix- Sampler prefix
- httpSamplerName- the http sampler name
- httpSampleNameMode- the naming mode of sampler name
- format- format to use when mode is 3
 
 
- 
- 
Method Details- 
isDetectGraphQLRequestpublic boolean isDetectGraphQLRequest()Return true if automatic GraphQL Request detection is enabled.- Returns:
- true if automatic GraphQL Request detection is enabled
 
- 
setDetectGraphQLRequestpublic void setDetectGraphQLRequest(boolean detectGraphQLRequest) Sets whether automatic GraphQL Request detection is enabled.- Parameters:
- detectGraphQLRequest- whether automatic GraphQL Request detection is enabled
 
- 
parseParses a http header from a stream.- Parameters:
- in- the stream to parse.
- Returns:
- array of bytes from client.
- Throws:
- IOException- when reading the input stream fails
 
- 
getHeaderManager
- 
getContentType
- 
getMultipartConfig
- 
serverNameFind the //server.name from an url.- Returns:
- server's internet name
 
- 
serverPortpublic int serverPort()Find the :PORT from http://server.ect:PORT/some/file.xxx- Returns:
- server's port (or UNSPECIFIED if not found)
 
- 
getPathFind the /some/file.xxxx from http://server.ect:PORT/some/file.xxx- Returns:
- the path
 
- 
getUrlReturns the url string extracted from the first line of the client request.- Returns:
- the url
 
- 
getMethodReturns the method string extracted from the first line of the client request.- Returns:
- the method (will always be upper case)
 
- 
getFirstLine
- 
getUrlWithoutQuery
- 
getHttpSamplerName- Returns:
- the httpSamplerName
 
- 
getRawPostDatapublic byte[] getRawPostData()- Returns:
- byte[] Raw post data
 
- 
getProtocol- Parameters:
- sampler-- HTTPSamplerBase
- Returns:
- String Protocol (http or https)
 
- 
getPrefix- Returns:
- the prefix or transaction name
 
- 
getHttpSampleNameModepublic int getHttpSampleNameMode()- Returns:
- the httpSampleNameMode
 
- 
getHttpSampleNameFormat
 
-