Class HttpRequestHdr
-
- All Implemented Interfaces:
public class HttpRequestHdr
The headers of the client HTTP request.
-
-
Field Summary
Fields Modifier and Type Field Description public final static String
CONTENT_TYPE
public final static String
CONTENT_LENGTH
public String
method
public String
url
public Array<byte>
rawPostData
public final String
httpSamplerName
public HeaderManager
headerManager
public String
firstLine
public final String
prefix
public final int
httpSampleNameMode
public final String
httpSampleNameFormat
-
Constructor Summary
Constructors Constructor Description HttpRequestHdr()
HttpRequestHdr(String httpSamplerName)
HttpRequestHdr(String prefix, String httpSamplerName)
HttpRequestHdr(String prefix, String httpSamplerName, int httpSampleNameMode, String format)
-
Method Summary
Modifier and Type Method Description String
getMethod()
Returns the method string extracted from the first line of the client request. String
getUrl()
Returns the url string extracted from the first line of the client request. Array<byte>
getRawPostData()
String
getHttpSamplerName()
HeaderManager
getHeaderManager()
String
getFirstLine()
String
getPrefix()
int
getHttpSampleNameMode()
String
getHttpSampleNameFormat()
boolean
isDetectGraphQLRequest()
Return true if automatic GraphQL Request detection is enabled. Array<byte>
parse(InputStream in)
Parses a http header from a stream. String
getContentType()
static MultipartUrlConfig
getMultipartConfig(String contentType)
String
serverName()
Find the //server.name from an url. int
serverPort()
Find the :PORT from http://server.ect:PORT/some/file. String
getPath()
Find the /some/file.xxxx from http://server.ect:PORT/some/file. String
getUrlWithoutQuery(URL url)
String
getProtocol(HTTPSamplerBase sampler)
void
setDetectGraphQLRequest(boolean detectGraphQLRequest)
Sets whether automatic GraphQL Request detection is enabled. -
-
Constructor Detail
-
HttpRequestHdr
HttpRequestHdr()
-
HttpRequestHdr
HttpRequestHdr(String httpSamplerName)
- Parameters:
httpSamplerName
- the http sampler name
-
HttpRequestHdr
HttpRequestHdr(String prefix, String httpSamplerName)
- Parameters:
prefix
- Sampler prefixhttpSamplerName
- the http sampler name
-
-
Method Detail
-
getMethod
String getMethod()
Returns the method string extracted from the first line of the client request.
-
getRawPostData
Array<byte> getRawPostData()
-
getHttpSamplerName
String getHttpSamplerName()
-
getHeaderManager
HeaderManager getHeaderManager()
-
getFirstLine
String getFirstLine()
-
getHttpSampleNameMode
int getHttpSampleNameMode()
-
getHttpSampleNameFormat
String getHttpSampleNameFormat()
-
isDetectGraphQLRequest
boolean isDetectGraphQLRequest()
Return true if automatic GraphQL Request detection is enabled.
-
parse
Array<byte> parse(InputStream in)
Parses a http header from a stream.
- Parameters:
in
- the stream to parse.
-
getContentType
String getContentType()
-
getMultipartConfig
static MultipartUrlConfig getMultipartConfig(String contentType)
-
serverName
String serverName()
Find the //server.name from an url.
-
serverPort
int serverPort()
Find the :PORT from http://server.ect:PORT/some/file.xxx
-
getUrlWithoutQuery
String getUrlWithoutQuery(URL url)
-
getProtocol
String getProtocol(HTTPSamplerBase sampler)
- Parameters:
sampler
- HTTPSamplerBase
-
setDetectGraphQLRequest
void setDetectGraphQLRequest(boolean detectGraphQLRequest)
Sets whether automatic GraphQL Request detection is enabled.
- Parameters:
detectGraphQLRequest
- whether automatic GraphQL Request detection is enabled
-
-
-
-