//
// WMNetworking.m
// Gengmei
//
// Created by wangyang on 1/15/15.
// Copyright (c) 2015 Wanmeichuangyi. All rights reserved.
//
#import "WMNetworking.h"
@implementation WMNetworking
static WMNetworking *_shareInstance=nil;
+ (WMNetworking *) sharedInstanceWithApiHost:(NSString *)apiHost{
if(!_shareInstance)
{
NSURL *baseURL = [NSURL URLWithString:apiHost];
_shareInstance=[[WMNetworking alloc] initWithBaseURL:baseURL];
_shareInstance.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"application/json",@"text/json",@"text/javascript",@"text/html",nil];
}
return _shareInstance;
}
@end
-
Thierry authored3cf509dd