org.apache.jmeter.protocol.http.curl

## 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 Summary

    Constructors
    Constructor and Description
    `Request()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addDnsServers(String dnsServer)`
    `void` | `addFormData(String key, String value)`
    `void` | `addFormStringData(String key, String value)`
    `void` | `addHeader(String name, String value)`
    `void` | `addOptionsIgnored(String option)`
    `void` | `addOptionsInProperties(String option)`
    `void` | `addOptionsNoSupport(String option)`
    `Authorization` | `getAuthorization()`
    `String` | `getCaCert()`
    `double` | `getConnectTimeout()`
    `List<Cookie>` | `getCookieInHeaders(String url)` Note that `setCookieInHeaders(String)` will have to be called first to set the cookies from headers.
    `List<Cookie>` | `getCookies(String url)` Note that `setCookies(String)` will have to be called first to set the cookies
    `String` | `getDnsResolver()`
    `Set<String>` | `getDnsServers()`
    `String` | `getFilepathCookie()`
    `Map<String,String>` | `getFormData()`
    `Map<String,String>` | `getFormStringData()`
    `Map<String,String>` | `getHeaders()`
    `String` | `getInterfaceName()`
    `int` | `getLimitRate()`
    `double` | `getMaxTime()`
    `String` | `getMethod()`
    `String` | `getNoproxy()`
    `List<String>` | `getOptionsIgnored()`
    `List<String>` | `getOptionsInProperties()`
    `List<String>` | `getOptionsNoSupport()`
    `String` | `getPostData()`
    `Map<String,String>` | `getProxyServer()`
    `String` | `getUrl()`
    `boolean` | `isCompressed()`
    `boolean` | `isKeepAlive()`
    `void` | `setCaCert(String caCert)` the options which work for SSL
    `void` | `setCompressed(boolean compressed)`
    `void` | `setConnectTimeout(double connectTimeout)`
    `void` | `setCookieInHeaders(String cookieInHeaders)`
    `void` | `setCookies(String cookies)`
    `void` | `setDnsResolver(String dnsResolver)` set DNS resolver
    `void` | `setFilepathCookie(String filepathCookie)`
    `void` | `setInterfaceName(String interfaceName)`
    `void` | `setKeepAlive(boolean isKeepAlive)`
    `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` | `setMaxTime(double maxTime)`
    `void` | `setMethod(String method)`
    `void` | `setNoproxy(String noproxy)` Set the list of hosts which don't use proxy
    `void` | `setPostData(String value)`
    `void` | `setProxyServer(String key, String value)`
    `void` | `setUrl(String url)`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Request

          public Request()

  - ### Method Detail

    - #### 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 Map<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 Map<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 Map<String,String> getFormData()

      Returns:
        the map of form data

    - #### addFormData

          public void addFormData(String key,
                                  String 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`

Copyright © 1998-2020 Apache Software Foundation. All Rights Reserved.