Class BasicCurlParser.Request
-
- All Implemented Interfaces:
public final class BasicCurlParser.Request
-
-
Field Summary
Fields Modifier and Type Field Description public String
url
public final List<Pair<String, String>>
headers
public String
method
public String
postData
public String
interfaceName
public double
connectTimeout
private String
cookies
private String
cookieInHeaders
public String
filepathCookie
public final Authorization
authorization
public String
caCert
public final List<Pair<String, ArgumentHolder>>
formData
public final List<Pair<String, String>>
formStringData
public final Set<String>
dnsServers
public boolean
isKeepAlive
public double
maxTime
public final List<String>
optionsIgnored
public final List<String>
optionsNoSupport
public final List<String>
optionsInProperties
public final Map<String, String>
proxyServer
public String
dnsResolver
public int
limitRate
public String
noproxy
-
Constructor Summary
Constructors Constructor Description BasicCurlParser.Request()
-
Method Summary
Modifier and Type Method Description String
getUrl()
void
setUrl(String url)
List<Pair<String, String>>
getHeaders()
String
getMethod()
void
setMethod(String method)
String
getPostData()
void
setPostData(String value)
String
getInterfaceName()
void
setInterfaceName(String interfaceName)
double
getConnectTimeout()
void
setConnectTimeout(double connectTimeout)
List<Cookie>
getCookies(String url)
Note that setCookies will have to be called first to set the cookies List<Cookie>
getCookieInHeaders(String url)
Note that setCookieInHeaders will have to be called first to set the cookies from headers. String
getFilepathCookie()
void
setFilepathCookie(String filepathCookie)
Authorization
getAuthorization()
String
getCaCert()
void
setCaCert(String caCert)
the options which work for SSL List<Pair<String, ArgumentHolder>>
getFormData()
List<Pair<String, String>>
getFormStringData()
Set<String>
getDnsServers()
boolean
isKeepAlive()
void
setKeepAlive(boolean isKeepAlive)
double
getMaxTime()
void
setMaxTime(double maxTime)
List<String>
getOptionsIgnored()
List<String>
getOptionsNoSupport()
List<String>
getOptionsInProperties()
Map<String, String>
getProxyServer()
String
getDnsResolver()
void
setDnsResolver(String dnsResolver)
set DNS resolver int
getLimitRate()
String
getNoproxy()
void
setNoproxy(String noproxy)
Set the list of hosts which don't use proxy boolean
isCompressed()
void
addHeader(String name, String value)
void
addOptionsInProperties(String option)
void
setLimitRate(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. void
addOptionsIgnored(String option)
void
addOptionsNoSupport(String option)
void
setProxyServer(String key, String value)
void
addDnsServers(String dnsServer)
void
addFormStringData(String key, String value)
void
addFormData(String key, ArgumentHolder value)
String
toString()
void
setCompressed(boolean compressed)
-
-
Method Detail
-
getHeaders
List<Pair<String, String>> getHeaders()
-
getPostData
String getPostData()
-
setPostData
void setPostData(String value)
- Parameters:
value
- the post data
-
getInterfaceName
String getInterfaceName()
-
setInterfaceName
void setInterfaceName(String interfaceName)
- Parameters:
interfaceName
- the name of interface
-
getConnectTimeout
double getConnectTimeout()
-
setConnectTimeout
void setConnectTimeout(double connectTimeout)
- Parameters:
connectTimeout
- the connection time out
-
getCookies
List<Cookie> getCookies(String url)
Note that setCookies will have to be called first to set the cookies
- Parameters:
url
- to extract domain and port from
-
getCookieInHeaders
List<Cookie> getCookieInHeaders(String url)
Note that setCookieInHeaders will have to be called first to set the cookies from headers.
- Parameters:
url
- to extract domain and port for the cookie from
-
getFilepathCookie
String getFilepathCookie()
-
setFilepathCookie
void setFilepathCookie(String filepathCookie)
- Parameters:
filepathCookie
- the filepathCookie to set
-
getAuthorization
Authorization getAuthorization()
-
setCaCert
void setCaCert(String caCert)
the options which work for SSL
- Parameters:
caCert
- cert of the CA
-
getFormData
List<Pair<String, ArgumentHolder>> getFormData()
-
getFormStringData
List<Pair<String, String>> getFormStringData()
-
getDnsServers
Set<String> getDnsServers()
-
isKeepAlive
boolean isKeepAlive()
-
setKeepAlive
void setKeepAlive(boolean isKeepAlive)
- Parameters:
isKeepAlive
- set if the Http request keeps alive
-
getMaxTime
double getMaxTime()
-
setMaxTime
void setMaxTime(double maxTime)
- Parameters:
maxTime
- max time of connection
-
getOptionsIgnored
List<String> getOptionsIgnored()
-
getOptionsNoSupport
List<String> getOptionsNoSupport()
-
getOptionsInProperties
List<String> getOptionsInProperties()
-
getProxyServer
Map<String, String> getProxyServer()
-
getDnsResolver
String getDnsResolver()
-
setDnsResolver
void setDnsResolver(String dnsResolver)
set DNS resolver
- Parameters:
dnsResolver
- name of the DNS resolver to use
-
getLimitRate
int getLimitRate()
-
getNoproxy
String getNoproxy()
-
setNoproxy
void setNoproxy(String noproxy)
Set the list of hosts which don't use proxy
- Parameters:
noproxy
- list of hosts that should not be used through the proxy
-
isCompressed
boolean isCompressed()
-
addHeader
void addHeader(String name, String value)
- Parameters:
name
- the field of Headervalue
- the value of Header
-
addOptionsInProperties
void addOptionsInProperties(String option)
- Parameters:
option
- the option
-
setLimitRate
void setLimitRate(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. And the speed in Curl is measured in bytes/second, so the conversion formula is cps=limitRate*1024
- Parameters:
limitRate
- the maximum transfer rate
-
addOptionsIgnored
void addOptionsIgnored(String option)
- Parameters:
option
- option is ignored
-
addOptionsNoSupport
void addOptionsNoSupport(String option)
- Parameters:
option
- option is not supported
-
setProxyServer
void setProxyServer(String key, String value)
- Parameters:
key
- keyvalue
- value
-
addDnsServers
void addDnsServers(String dnsServer)
- Parameters:
dnsServer
- set the list of DNS server
-
addFormStringData
void addFormStringData(String key, String value)
- Parameters:
key
- the key of form datavalue
- the value of form data
-
addFormData
void addFormData(String key, ArgumentHolder value)
- Parameters:
key
- the key of form datavalue
- the value of form data
-
setCompressed
void setCompressed(boolean compressed)
- Parameters:
compressed
- the compressed to set
-
-
-
-