Pebble Coding

ソフトウェアエンジニアによるIT技術、数学の備忘録

sendSynchronousRequestをBasic認証で使う

NSURLConnectionにはsendSynchronousRequestというクラスメソッドがありますが、 Basic認証は動かない。
ということで自作してみました。
https://github.com/pebble8888/PBURLConnection

@interface PBURLConnection : NSObject
+ (NSData *)sendSynchronousRequest:(NSURLRequest *)request returningResponse:(NSURLResponse **)response error:(NSError **)errorr user:(NSString *)user pass:(NSString *)pass;
@end