public class HttpRequestHdr extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CONTENT_LENGTH |
static String |
CONTENT_TYPE |
Constructor and Description |
---|
HttpRequestHdr() |
HttpRequestHdr(String httpSamplerName) |
HttpRequestHdr(String prefix,
String httpSamplerName) |
HttpRequestHdr(String prefix,
String httpSamplerName,
int httpSampleNameMode,
String format) |
Modifier and Type | Method and Description |
---|---|
String |
getContentType() |
String |
getFirstLine() |
HeaderManager |
getHeaderManager() |
String |
getHttpSampleNameFormat() |
int |
getHttpSampleNameMode() |
String |
getHttpSamplerName() |
String |
getMethod()
Returns the method string extracted from the first line of the client request.
|
MultipartUrlConfig |
getMultipartConfig(String contentType) |
String |
getPath()
Find the /some/file.xxxx from http://server.ect:PORT/some/file.xxx
|
String |
getPrefix() |
String |
getProtocol(HTTPSamplerBase sampler) |
byte[] |
getRawPostData() |
String |
getUrl()
Returns the url string extracted from the first line of the client request.
|
String |
getUrlWithoutQuery(URL url) |
boolean |
isDetectGraphQLRequest()
Return true if automatic GraphQL Request detection is enabled.
|
byte[] |
parse(InputStream in)
Parses a http header from a stream.
|
String |
serverName()
Find the //server.name from an url.
|
int |
serverPort()
Find the :PORT from http://server.ect:PORT/some/file.xxx
|
void |
setDetectGraphQLRequest(boolean detectGraphQLRequest)
Sets whether automatic GraphQL Request detection is enabled.
|
public static final String CONTENT_TYPE
public static final String CONTENT_LENGTH
public HttpRequestHdr()
public HttpRequestHdr(String httpSamplerName)
httpSamplerName
- the http sampler namepublic HttpRequestHdr(String prefix, String httpSamplerName)
prefix
- Sampler prefixhttpSamplerName
- the http sampler namepublic boolean isDetectGraphQLRequest()
public void setDetectGraphQLRequest(boolean detectGraphQLRequest)
detectGraphQLRequest
- whether automatic GraphQL Request detection is enabledpublic byte[] parse(InputStream in) throws IOException
in
- the stream to parse.IOException
- when reading the input stream failspublic HeaderManager getHeaderManager()
public String getContentType()
public MultipartUrlConfig getMultipartConfig(String contentType)
public String serverName()
public int serverPort()
public String getPath()
public String getUrl()
public String getMethod()
public String getFirstLine()
public String getHttpSamplerName()
public byte[] getRawPostData()
public String getProtocol(HTTPSamplerBase sampler)
sampler
- HTTPSamplerBase
public String getPrefix()
public int getHttpSampleNameMode()
public String getHttpSampleNameFormat()
Copyright © 1998-2022 Apache Software Foundation. All Rights Reserved.