NMACookieHelper

public class NMACookieHelper : NSObject

A helper class for NSHTTPCookie handling.

  • Create an NSHTTPCookie from a cookie String and a URL

    Declaration

    Swift

    @objc
    public func createCookie(from cookieString: String, for url: URL) -> HTTPCookie?

    Parameters

    cookieString

    the string containing the cookie properties

    url

    the url for the cookie

    Return Value

    an NSHTTPCookie with the provided properties

  • Returns the string representation of the provided HTTPCookie

    Declaration

    Swift

    @objc
    public func cookieAsString(from cookie: HTTPCookie) -> String?

    Parameters

    cookie

    the cookie to be stringified.

    Return Value

    the string created from the provided cookie.