Storage

Set Storage

Writes or updates values in different browser storage types based on the requested storageType (cookies, localStorage, sessionStorage, cache, or IndexedDB).

NOTE

Parameter Cookies LocalStorage SessionStorage Cache Storage IndexedDB
Domain action.Domain (implicit current origin) (implicit current origin) (implicit current origin) (unused, origin-scoped)
Path action.Path (cookie path) (unused) (unused) (unused) action.Path (database name) *
StoreName (unused) (unused) (unused) action.StoreName (cache name) * action.StoreName (object store) *
Key action.Key (cookie name) * action.Key * action.Key * action.Key (cache name / request) * action.Key (record key) *
Wildcard allowed? Domain, Path, Key Key only Key only StoreName, Key Path, StoreName, Key

* required for Set (send with Data).

Examples

MagicHelper: MagicHelper utility library

GPAL.MagicHelper.SetStorage(WebsiteStorageType storage type, string data, string domain, string path, string key, string storeName);

Puppeteer Client: Puppeteer-style C# client

browser.PuppeteerClient.SetStorage(WebsiteStorageType.localStorage).WithStorageDomain("ebay.com").WithStorageKey("u_sclid").WithStorageData(string data).Execute();

Puppeteer Communicator: Low-level communicator

await browser.PuppeteerCommunicator.SetStorage(string storageType, string sessionId, string domain, string key, string data, string storeName, string path);

REST Client: Direct REST/HTTP client

GPAL.OttoMagicClient.WithEndpoint(ApiEndpoint.SetStorage).WithStorageType(WebsiteStorageType.localStorage).WithStorageDomain("ebay.com").WithStorageKey("u_sclid").WithValue(string value).Execute();

💬 Ask GPAL