ios - How to Change base url of subclassed AFHTTPRequestOperationManager? -
in application using afnetworking restful services. adviced in tutorial subclassed afhttprequestoperationmanager
singleton class.
below implementation file
@implementation senetworkoperationmanager + (senetworkoperationmanager *)sharedsenetworkoperationmanagerwithurl:(nsurl *)url { static senetworkoperationmanager *_sharedweatherhttpclient = nil; static dispatch_once_t oncetoken; dispatch_once(&oncetoken, ^{ _sharedhttpoperationclient = [[self alloc] initwithbaseurl:url]; }); return _sharedhttpoperationclient; } - (instancetype)initwithbaseurl:(nsurl *)url { self = [super initwithbaseurl:url]; if (self) { self.responseserializer = [afjsonresponseserializer serializer]; self.requestserializer = [afjsonrequestserializer serializer]; } return self; }
but problem have change base url when need(we make our client type given base url)
help me if there solution changing base url.
Comments
Post a Comment