NetCenter.h 952 Bytes
//
//  NetCenter.h
//  public_i9133
//
//  Created by winFan on 12/2/15.
//  Copyright (c) 2015 winFan. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NetCenter : NSObject

@property(nonatomic,retain) NSMutableData *receiveData;

@property(nonatomic,assign)int dataPackSerialNo;


+ (NetCenter *)getInstance;

- (NSString *)httpGetSyn:(NSString *) getUrl;

- (NSString *)httpPostSyn:(NSString *) postUrl : (NSDictionary *) postData;

- (void)httpGetNoSyn;

- (void)httpPostNoSyn:(NSString *) postUrl :(NSDictionary *)postDict;

- (void)httpPostAsync:(NSString*)postUrl :(NSDictionary*)postDict;

- (void)httpPostAsyncOpen:(NSString*)postUrl :(NSDictionary*)postDict;

-(void)httpGetAsync:(NSString *)url completionHandler:(void (^ __nullable)(NSURLResponse* __nullable response, NSData* __nullable data, NSError* __nullable connectionError)) handler;

- (NSString * __nullable)dicToString:(NSDictionary * __nullable) dict;
@end