{"id":16981355,"url":"https://github.com/charonn0/xojo-cookieengine","last_synced_at":"2026-03-18T23:03:39.240Z","repository":{"id":145923128,"uuid":"436128481","full_name":"charonn0/Xojo-CookieEngine","owner":"charonn0","description":"A HTTP cookie engine for Realbasic and Xojo","archived":false,"fork":false,"pushed_at":"2024-07-07T22:43:27.000Z","size":50,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-26T17:47:50.056Z","etag":null,"topics":["cookie-manager","realbasic","xojo"],"latest_commit_sha":null,"homepage":"","language":"REALbasic","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/charonn0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"charonn0"}},"created_at":"2021-12-08T05:32:45.000Z","updated_at":"2024-07-07T22:43:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"d958f3a8-3e3f-4786-983a-dab578bc873f","html_url":"https://github.com/charonn0/Xojo-CookieEngine","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charonn0%2FXojo-CookieEngine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charonn0%2FXojo-CookieEngine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charonn0%2FXojo-CookieEngine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charonn0%2FXojo-CookieEngine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/charonn0","download_url":"https://codeload.github.com/charonn0/Xojo-CookieEngine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244883057,"owners_count":20525960,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cookie-manager","realbasic","xojo"],"created_at":"2024-10-14T02:05:16.009Z","updated_at":"2026-01-05T02:13:41.956Z","avatar_url":"https://github.com/charonn0.png","language":"REALbasic","funding_links":["https://github.com/sponsors/charonn0"],"categories":[],"sub_categories":[],"readme":"# Xojo-CookieEngine\n\nThe [CookieEngine](https://github.com/charonn0/Xojo-CookieEngine/wiki/CookieEngine) class implements web browser-like HTTP cookie management (a \"cookie engine\"). It can be used with the Realstudio HTTPSocket, Xojo.Net.HttpSocket, Xojo URLConnection, or any other HTTP client.\n\nIf you are on an older version of Xojo (or still using RealStudio) then you must delete the `ParseResponseHeaders(URL As String, ResponseHeaders As Iterable)` method before using this class. Leave the other `ParseResponseHeaders` method intact.\n\n## Example\n\n### Xojo URLConnection\n```realbasic\nDim engine As New CookieEngine ' create a new, empty CookieEngine\nengine.Load(GetFolderItem(\"cookies.txt\")) ' optionally load cookies from a file\nengine.SetCookie(\"foo\", \"bar\", \".example.com\") ' set cookies manually\n\nDim connection As New URLConnection\nDim url As String = \"https://www.example.com/\"\n\n' before a request call GenerateRequestHeader() to get a Cookie: header for the URL\nDim cookie As String = engine.GenerateRequestHeader(url)\nIf cookie \u003c\u003e \"\" Then connection.RequestHeader(\"Cookie\") = cookie\n\nCall connection.SendSync(\"GET\", url, 10)\n\n' after a request call ParseResponseHeaders() to collect any cookies that were set\nengine.ParseResponseHeaders(url, connection.ResponseHeaders)\n\n' optionally save cookies to a file\nengine.Save(GetFolderItem(\"cookies.txt\"))\n\n```\n\n### RealStudio HTTPSecureSocket\n```realbasic\nDim engine As New CookieEngine ' create a new, empty CookieEngine\nengine.Load(GetFolderItem(\"cookies.txt\")) ' optionally load cookies from a file\nengine.SetCookie(\"foo\", \"bar\", \".example.com\") ' set cookies manually\n\nDim connection As New HTTPSecureSocket\nDim url As String = \"https://www.example.com/\"\n\n' before a request call GenerateRequestHeader() to get a Cookie: header for the URL\nDim cookie As String = engine.GenerateRequestHeader(url)\nIf cookie \u003c\u003e \"\" Then connection.SetRequestHeader(\"Cookie\", cookie)\n\nCall connection.Get(url, 10)\n\n' after a request call ParseResponseHeaders() to collect any cookies that were set\nengine.ParseResponseHeaders(url, connection.PageHeaders)\n\n' optionally save cookies to a file\nengine.Save(GetFolderItem(\"cookies.txt\"))\n```\n\n## Become a sponsor\nIf you use this code in a commercial project, or just want to show your appreciation, please consider sponsoring me through GitHub. https://github.com/sponsors/charonn0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharonn0%2Fxojo-cookieengine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharonn0%2Fxojo-cookieengine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharonn0%2Fxojo-cookieengine/lists"}