SHHTTPRequest 0.0.2

SHHTTPRequest 0.0.2

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布上次发布2014年12月

ShengHuaWu 维护。



  • 作者:
  • ShengHua Wu

此项目用于同步或异步发送 HTTP 请求。它包含一个主类 SHNetworking

SHNetworking

同步或异步发送 HTTP 请求。

  • 请在 .h 文件中查看更多详情。

同步方法

    - (NSData *)httpGetRequestWithURL:(NSURL *)url headers:(NSDictionary *)headers parameters:(NSDictionary *)parameters response:(NSHTTPURLResponse **)response andError:(NSError **)error;

    - (NSData *)httpPostRequestWithURL:(NSURL *)url headers:(NSDictionary *)headers jsonData:(NSData *)jsonData response:(NSHTTPURLResponse **)response andError:(NSError **)error;

    - (NSData *)httpPutRequestWithURL:(NSURL *)url headers:(NSDictionary *)headers jsonData:(NSData *)jsonData response:(NSHTTPURLResponse **)response andError:(NSError **)error;

    - (NSData *)httpDeleteRequestWithURL:(NSURL *)url headers:(NSDictionary *)headers response:(NSHTTPURLResponse **)response andError:(NSError **)error;

异步方法

    - (void)httpGetRequestInBackgroundWithURL:(NSURL *)url headers:(NSDictionary *)headers parameters:(NSDictionary *)parameters andCompletion:(SHNetworkingCompletion)completion;

    - (void)httpPostRequestInBackgroundWithURL:(NSURL *)url headers:(NSDictionary *)headers jsonData:(NSData *)jsonData andCompletion:(SHNetworkingCompletion)completion;

    - (void)httpPutRequestInBackgroundWithURL:(NSURL *)url headers:(NSDictionary *)headers jsonData:(NSData *)jsonData andCompletion:(SHNetworkingCompletion)completion;

    - (void)httpDeleteRequestInBackgroundWithURL:(NSURL *)url headers:(NSDictionary *)headers andCompletion:(SHNetworkingCompletion)completion;