Contents

setDefaultCredential(_:for:)

Sets the default credential for a specified protection space.

Declaration

func setDefaultCredential(_ credential: URLCredential, for space: URLProtectionSpace)

Parameters

  • credential:

    The URL credential to set as the default for space. If the receiver does not contain credential in the specified protection space it will be added.

  • space:

    The protection space whose default credential is being set.

Discussion

If you override this method, also override setDefaultCredential(_:for:task:).

See Also

Getting and setting default credentials