Class HttpRequestHdr
-
- All Implemented Interfaces:
public class HttpRequestHdrThe headers of the client HTTP request.
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringCONTENT_TYPEpublic final static StringCONTENT_LENGTHpublic Stringmethodpublic Stringurlpublic Array<byte>rawPostDatapublic final StringhttpSamplerNamepublic HeaderManagerheaderManagerpublic StringfirstLinepublic final Stringprefixpublic final inthttpSampleNameModepublic final StringhttpSampleNameFormat
-
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 StringgetMethod()Returns the method string extracted from the first line of the client request. StringgetUrl()Returns the url string extracted from the first line of the client request. Array<byte>getRawPostData()StringgetHttpSamplerName()HeaderManagergetHeaderManager()StringgetFirstLine()StringgetPrefix()intgetHttpSampleNameMode()StringgetHttpSampleNameFormat()booleanisDetectGraphQLRequest()Return true if automatic GraphQL Request detection is enabled. Array<byte>parse(InputStream in)Parses a http header from a stream. StringgetContentType()static MultipartUrlConfiggetMultipartConfig(String contentType)StringserverName()Find the //server.name from an url. intserverPort()Find the :PORT from http://server.ect:PORT/some/file. StringgetPath()Find the /some/file.xxxx from http://server.ect:PORT/some/file. StringgetUrlWithoutQuery(URL url)StringgetProtocol(HTTPSamplerBase sampler)voidsetDetectGraphQLRequest(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
-
-
-
-