Interface Cookie


  • public interface Cookie
    This interface is used to hold details about an HTTP cookie.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String domain()
      This method is used to retrieve the domain for which the cookie is in scope.
      java.util.Optional<java.time.ZonedDateTime> expiration()
      This method is used to retrieve the expiration time for the cookie if available.
      java.lang.String name()
      This method is used to retrieve the name of the cookie.
      java.lang.String path()
      This method is used to retrieve the path for which the cookie is in scope.
      java.lang.String value()
      This method is used to retrieve the value of the cookie.
    • Method Detail

      • name

        java.lang.String name()
        This method is used to retrieve the name of the cookie.
        Returns:
        The name of the cookie
      • value

        java.lang.String value()
        This method is used to retrieve the value of the cookie.
        Returns:
        The value of the cookie.
      • domain

        java.lang.String domain()
        This method is used to retrieve the domain for which the cookie is in scope.
        Returns:
        The domain for which the cookie is in scope. Note: For cookies that have been obtained from generated responses (by calling HttpResponse.httpResponse(burp.api.montoya.core.ByteArray) and then HttpResponse.cookies()), the domain will be null if the response did not explicitly set a domain attribute for the cookie.
      • path

        java.lang.String path()
        This method is used to retrieve the path for which the cookie is in scope.
        Returns:
        The path for which the cookie is in scope or null if none is set.
      • expiration

        java.util.Optional<java.time.ZonedDateTime> expiration()
        This method is used to retrieve the expiration time for the cookie if available.
        Returns:
        The expiration time for the cookie (i.e., for non-persistent session cookies).