//
//  MPNetworkRequesting.h
//  MPServices
//
//  Created by Oleksandr Kradenkov on 1/29/18.
//  Copyright © 2018 MacPhun. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

typedef void(^MPURLSessionDataTaskCompletion)(NSData * _Nullable, NSURLResponse * _Nullable, NSError * _Nullable);

@protocol MPNetworkRequesting <NSObject>

- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request
                            completionHandler:(MPURLSessionDataTaskCompletion)completionHandler;
@end


@interface NSURLSession (MPProtocols) <MPNetworkRequesting>
@end

NS_ASSUME_NONNULL_END
