Class BasicCurlParser.Request
java.lang.Object
org.apache.jmeter.protocol.http.curl.BasicCurlParser.Request
- Enclosing class:
- BasicCurlParser
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDnsServers(String dnsServer) voidaddFormData(String key, ArgumentHolder value) voidaddFormStringData(String key, String value) voidvoidaddOptionsIgnored(String option) voidaddOptionsInProperties(String option) voidaddOptionsNoSupport(String option) doublegetCookieInHeaders(String url) Note thatsetCookieInHeaders(String)will have to be called first to set the cookies from headers.getCookies(String url) Note thatsetCookies(String)will have to be called first to set the cookiesList<org.apache.commons.lang3.tuple.Pair<String,ArgumentHolder>> intdoublegetUrl()booleanbooleanvoidthe options which work for SSLvoidsetCompressed(boolean compressed) voidsetConnectTimeout(double connectTimeout) voidsetCookieInHeaders(String cookieInHeaders) voidsetCookies(String cookies) voidsetDnsResolver(String dnsResolver) set DNS resolvervoidsetFilepathCookie(String filepathCookie) voidsetInterfaceName(String interfaceName) voidsetKeepAlive(boolean isKeepAlive) voidsetLimitRate(String limitRate) Transform the bandwidth to cps value (byte/s), cps = bandwidth*1024/8, the unit of bandwidth in JMeter is measured in kbit/s.voidsetMaxTime(double maxTime) voidvoidsetNoproxy(String noproxy) Set the list of hosts which don't use proxyvoidsetPostData(String value) voidsetProxyServer(String key, String value) voidtoString()
-
Constructor Details
-
Request
public Request()
-
-
Method Details
-
getMethod
- Returns:
- the HTTP method
-
setMethod
- Parameters:
method- the HTTP method to set
-
setPostData
- Parameters:
value- the post data
-
getPostData
- Returns:
- the postData
-
isCompressed
public boolean isCompressed()- Returns:
- the compressed
-
setCompressed
public void setCompressed(boolean compressed) - Parameters:
compressed- the compressed to set
-
addHeader
- Parameters:
name- the field of Headervalue- the value of Header
-
getCookieInHeaders
Note thatsetCookieInHeaders(String)will have to be called first to set the cookies from headers.- Parameters:
url- to extract domain and port for the cookie from- Returns:
- the extracted cookies in the earlier set headers
-
setCookieInHeaders
- Parameters:
cookieInHeaders- the cookieInHeaders to set
-
getUrl
- Returns:
- the url
-
setUrl
- Parameters:
url- the url to set
-
getHeaders
- Returns:
- the headers
-
getOptionsInProperties
- Returns:
- the list of options which are ignored
-
addOptionsInProperties
- Parameters:
option- the option
-
getLimitRate
public int getLimitRate()- Returns:
- the maximum transfer rate
-
setLimitRate
Transform the bandwidth to cps value (byte/s), cps = bandwidth*1024/8, the unit of bandwidth in JMeter is measured in kbit/s. And the speed in Curl is measured in bytes/second, so the conversion formula is cps=limitRate*1024- Parameters:
limitRate- the maximum transfer rate
-
getNoproxy
- Returns:
- this list of hosts which don't use proxy
-
setNoproxy
Set the list of hosts which don't use proxy- Parameters:
noproxy- list of hosts that should not be used through the proxy
-
getDnsResolver
- Returns:
- the DNS resolver
-
setDnsResolver
set DNS resolver- Parameters:
dnsResolver- name of the DNS resolver to use
-
getInterfaceName
- Returns:
- the interface name to perform an operation
-
setInterfaceName
- Parameters:
interfaceName- the name of interface
-
getOptionsIgnored
- Returns:
- the list of options which are ignored
-
addOptionsIgnored
- Parameters:
option- option is ignored
-
getOptionsNoSupport
- Returns:
- the list of options which are not supported by JMeter
-
addOptionsNoSupport
- Parameters:
option- option is not supported
-
getProxyServer
- Returns:
- the map of proxy server
-
setProxyServer
- Parameters:
key- keyvalue- value
-
isKeepAlive
public boolean isKeepAlive()- Returns:
- if the Http request keeps alive
-
setKeepAlive
public void setKeepAlive(boolean isKeepAlive) - Parameters:
isKeepAlive- set if the Http request keeps alive
-
getDnsServers
- Returns:
- the list of DNS server
-
addDnsServers
- Parameters:
dnsServer- set the list of DNS server
-
getFormStringData
- Returns:
- the map of form data
-
addFormStringData
- Parameters:
key- the key of form datavalue- the value of form data
-
getFormData
- Returns:
- the map of form data
-
addFormData
- Parameters:
key- the key of form datavalue- the value of form data
-
getCaCert
- Returns:
- the certificate of the CA
-
setCaCert
the options which work for SSL- Parameters:
caCert- cert of the CA
-
getAuthorization
- Returns:
- the authorization
-
getConnectTimeout
public double getConnectTimeout()- Returns:
- the connection time out
-
setConnectTimeout
public void setConnectTimeout(double connectTimeout) - Parameters:
connectTimeout- the connection time out
-
getMaxTime
public double getMaxTime()- Returns:
- the max time of connection
-
setMaxTime
public void setMaxTime(double maxTime) - Parameters:
maxTime- max time of connection
-
getFilepathCookie
- Returns:
- the filepathCookie
-
setFilepathCookie
- Parameters:
filepathCookie- the filepathCookie to set
-
getCookies
Note thatsetCookies(String)will have to be called first to set the cookies- Parameters:
url- to extract domain and port from- Returns:
- the cookies
-
setCookies
- Parameters:
cookies- the cookies to set
-
toString
-