
$ch = curl_init();
$header[] = "Content-type: text/xml";//定义content-type为xml
curl_setopt($ch, CURLOPT_URL, $url); //定义表单提交地址
curl_setopt($ch, CURLOPT_POST, 1); //定义提交类型 1:POST ;0:GET
curl_setopt($ch, CURLOPT_HEADER, 1); //定义是否显示状态头 1:显示 ; 0:不显示
curl_setopt($ch, CURLOPT_>发送请求:
- (void)sendUpdateUserRequest
{
//添加等待
[MBProgressHUD showHUDWithText:@"正在更新,请稍候···"
toView:selfnavigationControllerview animated:YES];
NSMutableDictionary headDict=[[NSMutableDictionary alloc] init];
NSMutableDictionary dataDict=[[NSMutableDictionary alloc] init];
//组装数据,只是一个例子,可以添加你想要的属性以及值
[headDict setObject:@"user" forKey:@"function"];
[dataDict setObject:_useridLabeltext forKey:@"userid"];
//要发送的数据
>欢迎分享,转载请注明来源:内存溢出
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)