Skip to content

Add persistent cookie jar + fix query separator default

Jaroslav Petrusevic requested to merge feature/cookie-jar-csrf into master

Keep one shared CookieJar per HttpClient instance so Set-Cookie values (session, CSRF/forgery tokens) survive across the multiple Guzzle clients the wrapper builds. Needed for DirectAdmin plugin (index.raw) CSRF flow, where the ?a=cookie seeding response must be echoed back on the follow-up POST. Adds getCookieJar(), withCookieJar() and getCookie($name) helpers.

Also fix query_param_separator default from the HTML entity '&' to '&' (property + setQueryParamSeparator default), which produced malformed URLs.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com Claude-Session: https://claude.ai/code/session_01MciJq6L5KLFRvVYCgt7ZpG

Merge request reports