                       interceptionProcedure: interceptionProcedure, configuration: configuration)
     }
 
+    /// Creates `EndpointProcedure` connecting with HTTP endpoint.
+    ///
+    /// - Parameters:
+    ///   - requestData: specifies attributes of HTTP request.
+    ///   - configuration: determines what `dataLoadingProcedureFactory`, `dataDeserializationProcedureFactory`
+    /// and `responseMappingProcedureFactory` should be used for coresponding procedures creation.
+    /// `Configuration.default` used if no value passed.
+    /// If no value passed and `Configuration.default` is not initialize,
+    /// `EndpointProcedure` will finish with `EndpointProcedureError.missingConfiguration
+    ///
     public convenience init(requestData: HTTPRequestData, configuration: ConfigurationProtocol! = nil) {
         let validationProcedure = HTTPDataFlowProcedure<Result>.createEmptyValidationProcedure()
         let interceptionProcedure = HTTPDataFlowProcedure<Result>.createEmptyInterceptionProcedure()


import ProcedureKit

public enum EndpointProcedureError: Error {
    case missingConfiguration
    case pendingOutputAfterCompletion
}

private enum EndpointProcedureInitialization<Result> {
    case error(Error)
    case dataFlowProcedure(DataFlowProcedure<Result>)
}

open class EndpointProcedure<Result>: GroupProcedure, OutputProcedure {
    public var output: Pending<ProcedureResult<Result>> {
        get {
            switch self.initialization {


extension EndpointProcedure {

    /// Creates `EndpointProcedure` connecting with enpoint specified in `dataLoadingProcedure`.
    /// Can be used for connecting to local endpoits.
    ///
    /// - Parameters:
    ///   - dataLoadingProcedure: specifies connection to data endpoint.
    ///   - configuration: determines what `dataDeserializationProcedureFactory`
    /// and `responseMappingProcedureFactory` should be used for coresponding procedures creation.
    /// `Configuration.default` used if no value passed.
    /// If no value passed and `Configuration.default` is not initialize,
    /// `EndpointProcedure` will finish with `EndpointProcedureError.missingConfiguration
    ///
    public convenience init<L: Procedure>(dataLoadingProcedure: L, configuration: ConfigurationProtocol! = nil)
                    where L: OutputProcedure, L.Output == Data {
        let interceptionProcedure = DataFlowProcedure<Result>.createEmptyInterceptionProcedure()
