Class ZestRequest


  • public class ZestRequest
    extends ZestStatement
    The Class ZestRequest.
    • Constructor Detail

      • ZestRequest

        public ZestRequest​(int index)
        Instantiates a new zest request.
        Parameters:
        index - the index
      • ZestRequest

        public ZestRequest()
        Instantiates a new zest request.
    • Method Detail

      • getUrl

        public URL getUrl()
        Gets the url.
        Returns:
        the url
      • setUrl

        public void setUrl​(URL url)
        Sets the url.
        Parameters:
        url - the new url
      • getUrlToken

        public String getUrlToken()
        Gets the url token.
        Returns:
        the url token
      • setUrlToken

        public void setUrlToken​(String urlToken)
        Sets the url token.
        Parameters:
        urlToken - the new url token
      • getData

        public String getData()
        Gets the data.
        Returns:
        the data
      • setData

        public void setData​(String data)
        Sets the data.
        Parameters:
        data - the new data
      • getHeaders

        public String getHeaders()
        Gets the headers.
        Returns:
        the headers
      • setHeaders

        public void setHeaders​(String headers)
        Sets the headers.
        Parameters:
        headers - the new headers
      • getMethod

        public String getMethod()
        Gets the method.
        Returns:
        the method
      • setMethod

        public void setMethod​(String method)
        Sets the method.
        Parameters:
        method - the new method
      • addAssertion

        public void addAssertion​(ZestAssertion assertion)
        Adds the assertion.
        Parameters:
        assertion - the assertion
      • removeAssertion

        public void removeAssertion​(ZestAssertion assertion)
        Removes the assertion.
        Parameters:
        assertion - the assertion
      • getAssertions

        public List<ZestAssertion> getAssertions()
        Gets the assertions.
        Returns:
        the assertions
      • getResponse

        public ZestResponse getResponse()
        Gets the response.
        Returns:
        the response
      • setResponse

        public void setResponse​(ZestResponse response)
        Sets the response.
        Parameters:
        response - the new response
      • isFollowRedirects

        public boolean isFollowRedirects()
      • setFollowRedirects

        public void setFollowRedirects​(boolean followRedirects)
      • getTimestamp

        public long getTimestamp()
        Gets when the request was sent (unix time).
        Returns:
        the timestamp when the request was sent.
        Since:
        0.14.0
      • setTimestamp

        public void setTimestamp​(long timestamp)
        Sets when the request was sent (unix time).
        Parameters:
        timestamp - the timestamp when the request was sent.
        Since:
        0.14.0
      • moveUp

        public void moveUp​(ZestElement ze)
        Move up.
        Parameters:
        ze - the ze
      • moveDown

        public void moveDown​(ZestElement ze)
        Move down.
        Parameters:
        ze - the ze
      • replaceTokens

        public void replaceTokens​(ZestVariables tokens)
        Replace tokens.
        Parameters:
        tokens - the tokens
      • isSameSubclass

        public boolean isSameSubclass​(ZestElement ze)
        Description copied from class: ZestElement
        Checks if is same subclass.
        Overrides:
        isSameSubclass in class ZestStatement
        Parameters:
        ze - the ze
        Returns:
        true, if is same subclass
      • isPassive

        public boolean isPassive()
        Description copied from class: ZestStatement
        Checks if is passive.
        Specified by:
        isPassive in class ZestStatement
        Returns:
        true, if is passive
      • clearCookies

        public void clearCookies()
      • addCookie

        public void addCookie​(ZestCookie cookie)