InternetSetCookie

[DllImport("wininet.dll", SetLastError = true, CharSet = CharSet.Auto)]
public static extern bool InternetSetCookie(
   string lpszUrl,
   string lpszCookieName,
   string lpszCookieData
);

Microsoft documentation: Link

Last updated