Skip to content
1.3.0 documentation · List APIs, scoped deletion, and normalized errors are available from 1.3.0. View release history ↗

API overview ​

Import the default NitroCookies object to access all 23 operations. Signatures in this reference describe methods on that object.

ts
import NitroCookies, {
  CookieErrorCode,
  type Cookie,
  type CookieIdentifier,
  type Cookies,
  type CookieError,
} from "react-native-nitro-cookies";

Find an operation ​

TaskMethodsReference
Read stored cookiesgetSync, get, getListSync, getList, getAll, getAllListRead cookies
Write cookiessetSync, set, setManySync, setMany, setFromResponseSync, setFromResponseWrite cookies
Build headers or fetch response cookiesgetCookieHeaderSync, getCookieHeader, getFromResponse, getFromResponseListHeaders and responses
Delete cookiesclearCookieSync, clearCookie, clearByNameSync, clearByName, clearAllDelete cookies
Persist or remove session cookiesflush, removeSessionCookiesPersistence and sessions

Shared conventions ​

  • Supply a full HTTP(S) URL where a URL is required.
  • useWebKit is an optional boolean argument, not an options object. Its default is false.
  • Sync methods use the default store. Async methods return a Promise, but completion guarantees still depend on the platform and operation.
  • Dictionary results use cookie names as keys. Lists preserve duplicate names.
  • Failures in the wrapper expose a string code. Read the error contract before implementing recovery.

The list/scoped-deletion APIs and normalized error contract are available in 1.3.0. See installation for release availability and upgrade steps.

See types for data shapes and platform support for availability.

Documentation for AI tools ​

Use llms.txt to find Markdown pages by topic, or llms-full.txt to read the complete English documentation in one file. Both files are generated from these docs and include the same release guidance and platform limits.

MIT licensed · React Native Nitro Cookies