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) |
Modifier and Type | Method and Description |
---|---|
String |
getContentType() |
String |
getFirstLine() |
HeaderManager |
getHeaderManager() |
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) |
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
|
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 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()
Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.