APICategory

final public class APICategory : Category
extension APICategory: DefaultLogger
extension APICategory: APICategoryAuthProviderFactoryBehavior
extension APICategory: APICategoryGraphQLBehavior
extension APICategory: APICategoryInterceptorBehavior
extension APICategory: APICategoryRESTBehavior
extension APICategory: APICategoryReachabilityBehavior
extension APICategory: Resettable

The API category provides a solution for making HTTP requests to REST and GraphQL endpoints.

  • The category type for API

    Declaration

    Swift

    public var categoryType: CategoryType { get }
  • true if this category has been configured with Amplify.configure().

    Warning

    This property is intended for use by plugin developers.

    Declaration

    Swift

    public var isConfigured: Bool

Plugin handling

  • Adds plugin to the list of Plugins that implement functionality for this category.

    Declaration

    Swift

    public func add(plugin: APICategoryPlugin) throws

    Parameters

    plugin

    The Plugin to add

  • Returns the added plugin with the specified key property.

    Declaration

    Swift

    public func getPlugin(for key: PluginKey) throws -> APICategoryPlugin

    Parameters

    key

    The PluginKey (String) of the plugin to retrieve

    Return Value

    The wrapped plugin

  • Removes the plugin registered for key from the list of Plugins that implement functionality for this category. If no plugin has been added for key, no action is taken, making this method safe to call multiple times.

    Declaration

    Swift

    public func removePlugin(for key: PluginKey)

    Parameters

    key

    The key used to add the plugin

  • log

    Declaration

    Swift

    public static var log: Logger { get }
  • log

    Declaration

    Swift

    public var log: Logger { get }
  • Retrieve the plugin’s auth provider factory

    Declaration

    Swift

    public func apiAuthProviderFactory() -> APIAuthProviderFactory

    Return Value

    auth provider factory

Request-based GraphQL operations