Class BasicCurlParser.Request

java.lang.Object
org.apache.jmeter.protocol.http.curl.BasicCurlParser.Request
Enclosing class:
BasicCurlParser

public static final class BasicCurlParser.Request extends Object
  • Constructor Details

    • Request

      public Request()
  • Method Details

    • getMethod

      public String getMethod()
      Returns:
      the HTTP method
    • setMethod

      public void setMethod(String method)
      Parameters:
      method - the HTTP method to set
    • setPostData

      public void setPostData(String value)
      Parameters:
      value - the post data
    • getPostData

      public String getPostData()
      Returns:
      the postData
    • isCompressed

      public boolean isCompressed()
      Returns:
      the compressed
    • setCompressed

      public void setCompressed(boolean compressed)
      Parameters:
      compressed - the compressed to set
    • addHeader

      public void addHeader(String name, String value)
      Parameters:
      name - the field of Header
      value - the value of Header
    • getCookieInHeaders

      public List<Cookie> getCookieInHeaders(String url)
      Note that setCookieInHeaders(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

      public void setCookieInHeaders(String cookieInHeaders)
      Parameters:
      cookieInHeaders - the cookieInHeaders to set
    • getUrl

      public String getUrl()
      Returns:
      the url
    • setUrl

      public void setUrl(String url)
      Parameters:
      url - the url to set
    • getHeaders

      public List<org.apache.commons.lang3.tuple.Pair<String,String>> getHeaders()
      Returns:
      the headers
    • getOptionsInProperties

      public List<String> getOptionsInProperties()
      Returns:
      the list of options which are ignored
    • addOptionsInProperties

      public void addOptionsInProperties(String option)
      Parameters:
      option - the option
    • getLimitRate

      public int getLimitRate()
      Returns:
      the maximum transfer rate
    • setLimitRate

      public 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
    • getNoproxy

      public String getNoproxy()
      Returns:
      this list of hosts which don't use proxy
    • setNoproxy

      public 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
    • getDnsResolver

      public String getDnsResolver()
      Returns:
      the DNS resolver
    • setDnsResolver

      public void setDnsResolver(String dnsResolver)
      set DNS resolver
      Parameters:
      dnsResolver - name of the DNS resolver to use
    • getInterfaceName

      public String getInterfaceName()
      Returns:
      the interface name to perform an operation
    • setInterfaceName

      public void setInterfaceName(String interfaceName)
      Parameters:
      interfaceName - the name of interface
    • getOptionsIgnored

      public List<String> getOptionsIgnored()
      Returns:
      the list of options which are ignored
    • addOptionsIgnored

      public void addOptionsIgnored(String option)
      Parameters:
      option - option is ignored
    • getOptionsNoSupport

      public List<String> getOptionsNoSupport()
      Returns:
      the list of options which are not supported by JMeter
    • addOptionsNoSupport

      public void addOptionsNoSupport(String option)
      Parameters:
      option - option is not supported
    • getProxyServer

      public Map<String,String> getProxyServer()
      Returns:
      the map of proxy server
    • setProxyServer

      public void setProxyServer(String key, String value)
      Parameters:
      key - key
      value - 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

      public Set<String> getDnsServers()
      Returns:
      the list of DNS server
    • addDnsServers

      public void addDnsServers(String dnsServer)
      Parameters:
      dnsServer - set the list of DNS server
    • getFormStringData

      public List<org.apache.commons.lang3.tuple.Pair<String,String>> getFormStringData()
      Returns:
      the map of form data
    • addFormStringData

      public void addFormStringData(String key, String value)
      Parameters:
      key - the key of form data
      value - the value of form data
    • getFormData

      public List<org.apache.commons.lang3.tuple.Pair<String,ArgumentHolder>> getFormData()
      Returns:
      the map of form data
    • addFormData

      public void addFormData(String key, ArgumentHolder value)
      Parameters:
      key - the key of form data
      value - the value of form data
    • getCaCert

      public String getCaCert()
      Returns:
      the certificate of the CA
    • setCaCert

      public void setCaCert(String caCert)
      the options which work for SSL
      Parameters:
      caCert - cert of the CA
    • getAuthorization

      public Authorization 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

      public String getFilepathCookie()
      Returns:
      the filepathCookie
    • setFilepathCookie

      public void setFilepathCookie(String filepathCookie)
      Parameters:
      filepathCookie - the filepathCookie to set
    • getCookies

      public List<Cookie> getCookies(String url)
      Note that setCookies(String) will have to be called first to set the cookies
      Parameters:
      url - to extract domain and port from
      Returns:
      the cookies
    • setCookies

      public void setCookies(String cookies)
      Parameters:
      cookies - the cookies to set
    • toString

      public String toString()
      Overrides:
      toString in class Object