Managing Cookies Using the HTTP Client
Introduction
The HTTP Client in Martini Desktop features a Cookie Manager, which is instrumental in handling cookies associated with different domains.
Cookie Management
Cookie Persistence
- Storage: Cookies sent back by the server are stored and persisted by the Cookie Manager.
- Accessibility: Persisted cookies can be modified even after closing and reopening Martini Desktop.
Cookie Precedence
- When sending an HTTP request, the Cookie Manager automatically includes cookies matching the request's domain and URL.
- If both the Cookie Manager and the 'Cookies' tab of a request contain a cookie with the same name, the cookie defined in the 'Cookies' tab takes precedence.
Accessing the Cookie Manager
- To open the Cookie Manager, click the cookie-shaped icon located in the top right corner of the HTTP Client's Request panel.
Adding a New Domain
Steps to Add a Domain
- Initiate Domain Addition: Click the green '+' button at the top of the Domain panel, next to the search bar.
- Enter Domain Details: Type in the host name (excluding the scheme, port, and query string).
- Confirm Addition: Press the enter key to add the domain.
Adding a New Cookie
Steps to Add a Cookie
- Select a Domain: Choose the domain to which the cookie will be associated.
- Initiate Cookie Addition: Click the green '+' button in the top right corner of the cookie table.
- Enter Cookie Details: Double-click a cell to edit its value, and press enter to finalize each cell's content.
- Save Changes: Click the 'Save' button to apply your changes.
Disabling a Cookie
- Functionality: You can prevent a cookie from being sent with requests by unchecking the checkbox beside its name.