Inherits from NSObject
Declared in WeiboSDK.h

Overview

微博封装Http请求的消息结构

Properties

delegate

WBHttpRequestDelegate对象,用于接收微博SDK对于发起的接口请求的请求的响应

@property (nonatomic, assign) id<WBHttpRequestDelegate> delegate

Declared In

WeiboSDK.h

httpMethod

用户自定义请求方式

@property (nonatomic, retain) NSString *httpMethod

Discussion

支持"GET" “POST”

Declared In

WeiboSDK.h

params

用户自定义请求参数字典

@property (nonatomic, retain) NSDictionary *params

Declared In

WeiboSDK.h

tag

用户自定义TAG

@property (nonatomic, retain) NSString *tag

Discussion

用于区分回调Request

Declared In

WeiboSDK.h

url

用户自定义请求地址URL

@property (nonatomic, retain) NSString *url

Declared In

WeiboSDK.h

Class Methods

requestWithAccessToken:url:httpMethod:params:delegate:withTag:

统一微博Open API HTTP请求接口 调用此接口后,将发送一个HTTP网络请求(用于访问微博open api)

+ (WBHttpRequest *)requestWithAccessToken:(NSString *)accessToken url:(NSString *)url httpMethod:(NSString *)httpMethod params:(NSDictionary *)params delegate:(id<WBHttpRequestDelegate>)delegate withTag:(NSString *)tag

Parameters

accessToken

应用获取到的accessToken,用于身份验证

url

请求url地址

httpMethod

支持"GET" “POST”

params

向接口传递的参数结构

delegate

WBHttpRequestDelegate对象,用于接收微博SDK对于发起的接口请求的请求的响应

tag

用户自定义TAG,将通过回调WBHttpRequest实例的tag属性返回

Declared In

WeiboSDK.h

requestWithURL:httpMethod:params:delegate:withTag:

统一HTTP请求接口 调用此接口后,将发送一个HTTP网络请求

+ (WBHttpRequest *)requestWithURL:(NSString *)url httpMethod:(NSString *)httpMethod params:(NSDictionary *)params delegate:(id<WBHttpRequestDelegate>)delegate withTag:(NSString *)tag

Parameters

url

请求url地址

httpMethod

支持"GET" “POST”

params

向接口传递的参数结构

delegate

WBHttpRequestDelegate对象,用于接收微博SDK对于发起的接口请求的请求的响应

tag

用户自定义TAG,将通过回调WBHttpRequest实例的tag属性返回

Declared In

WeiboSDK.h

Instance Methods

disconnect

取消网络请求接口 调用此接口后,将取消当前网络请求,建议同时[WBHttpRequest setDelegate:nil];

- (void)disconnect

Declared In

WeiboSDK.h