Back to Alamofire

State

docs/Classes/Request/State.html

5.12.01.3 KB
Original Source

State

public enum State

State of the Request, with managed transitions between states set when calling resume(), suspend(), or cancel() on the Request.

`

                initialized
                `

Initial state of the Request.

Declaration

Swift

case initialized

`

                resumed
                `

State set when resume() is called. Any tasks created for the Request will have resume() called on them in this state.

Declaration

Swift

case resumed

`

                suspended
                `

State set when suspend() is called. Any tasks created for the Request will have suspend() called on them in this state.

Declaration

Swift

case suspended

`

                cancelled
                `

State set when cancel() is called. Any tasks created for the Request will have cancel() called on them. Unlike resumed or suspended, once in the cancelled state, the Request can no longer transition to any other state.

Declaration

Swift

case cancelled

`

                finished
                `

State set when all response serialization completion closures have been cleared on the Request and enqueued on their respective queues.

Declaration

Swift

case finished