Class BasicCurlParser.Request
-
- All Implemented Interfaces:
public final class BasicCurlParser.Request
-
-
Field Summary
Fields Modifier and Type Field Description public Stringurlpublic final List<Pair<String, String>>headerspublic Stringmethodpublic StringpostDatapublic StringinterfaceNamepublic doubleconnectTimeoutprivate Stringcookiesprivate StringcookieInHeaderspublic StringfilepathCookiepublic final Authorizationauthorizationpublic StringcaCertpublic final List<Pair<String, ArgumentHolder>>formDatapublic final List<Pair<String, String>>formStringDatapublic final Set<String>dnsServerspublic booleanisKeepAlivepublic doublemaxTimepublic final List<String>optionsIgnoredpublic final List<String>optionsNoSupportpublic final List<String>optionsInPropertiespublic final Map<String, String>proxyServerpublic StringdnsResolverpublic intlimitRatepublic Stringnoproxy
-
Constructor Summary
Constructors Constructor Description BasicCurlParser.Request()
-
Method Summary
Modifier and Type Method Description StringgetUrl()voidsetUrl(String url)List<Pair<String, String>>getHeaders()StringgetMethod()voidsetMethod(String method)StringgetPostData()voidsetPostData(String value)StringgetInterfaceName()voidsetInterfaceName(String interfaceName)doublegetConnectTimeout()voidsetConnectTimeout(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. StringgetFilepathCookie()voidsetFilepathCookie(String filepathCookie)AuthorizationgetAuthorization()StringgetCaCert()voidsetCaCert(String caCert)the options which work for SSL List<Pair<String, ArgumentHolder>>getFormData()List<Pair<String, String>>getFormStringData()Set<String>getDnsServers()booleanisKeepAlive()voidsetKeepAlive(boolean isKeepAlive)doublegetMaxTime()voidsetMaxTime(double maxTime)List<String>getOptionsIgnored()List<String>getOptionsNoSupport()List<String>getOptionsInProperties()Map<String, String>getProxyServer()StringgetDnsResolver()voidsetDnsResolver(String dnsResolver)set DNS resolver intgetLimitRate()StringgetNoproxy()voidsetNoproxy(String noproxy)Set the list of hosts which don't use proxy booleanisCompressed()voidaddHeader(String name, String value)voidaddOptionsInProperties(String option)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. voidaddOptionsIgnored(String option)voidaddOptionsNoSupport(String option)voidsetProxyServer(String key, String value)voidaddDnsServers(String dnsServer)voidaddFormStringData(String key, String value)voidaddFormData(String key, ArgumentHolder value)StringtoString()voidsetCompressed(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
-
-
-
-