草庐IT

post_type

全部标签

iphone - 如何使用 nsurlconnection 发送 post 请求

我已经为我的数据库连接等切换到NSURLConnection和NSURLRequest委托(delegate)。我正在使用ASIHTTPRequest库来完成所有这些工作,但由于缺乏对第3方库的支持,我最终决定继续前进。我想知道的是如何像您使用ASIFormDataRequest一样向我的数据库发送发布请求,如下所示//ThissetsupallotherrequestASIFormDataRequest*request=[ASIFormDataRequestrequestWithURL:url];[requestsetDelegate:self];[requestsetValidat

file-type - 无法让 "Open in MyApp"在我的 iOS 应用程序中使用 PNG 或 JPG 邮件附件

以下是我应用的info.plist文件的相关内容:CFBundleDocumentTypesCFBundleTypeIconFilesicon_72x72.pngCFBundleTypeNameMyAppFileCFBundleTypeRoleViewerLSHandlerRankOwnerLSItemContentTypescom.myapp.exportcom.myapp.backupcom.adobe.pdfpublic.comma-separated-values-textpublic.jpegpublic.pngcom.microsoft.excel.xls当我尝试点击并按住

ios - 错误 : Generic parameter 'R.Generator.Element' cannot be bound to non-@objc protocol type 'AnyObject'

我正在查询HealthKit并将其保存到CoreData。我在一个单独的类中获取数据。在TableViewController中,我将数据附加到数组:ifNSUserDefaults.standardUserDefaults().boolForKey("weightSwitch")==true{xAxisDatesArray.append(cdFetchWeight.queryCoreDataDate())yAxisValuesArray.append(cdFetchWeight.queryCoreDataData())并将其传递给tableView.dequeueReusableCe

ios - AFNetworking 3.0 GET/POST 设置 acceptableContentTypes 并清除图像缓存

我在我的项目中使用AFNetworking作为网络层。对于图像,我遇到了一些与缓存相关的问题,我将框架更新到3.0版本。在更新过程中,我在获取媒体内容(图像和视频)的请求方面遇到了一些问题。这是我的课:+(void)requestWithMethod:(NSString*)methodTypeValuepath:(NSString*)pathValueparameters:(NSDictionary*)paramstoken:(NSString*)tokendebug:(BOOL)debugcompletionHandler:(void(^)(idresult,NSError*erro

mysql - 从 iOS 设备通过 POST 方法将数据插入远程 mysql 数据库

我有3个值:编号姓名电子邮件我有三个UIText字段,我可以在其中提供这些输入并将这些值保存到远程数据库中。我使用GET方法来完成它。我没有问题。但是,如果我想用POST方法做同样的事情,我该怎么做。我认为下面现有的代码会有一点变化。如果有人知道解决方案,请与我分享。非常感谢。祝你今天过得愉快。:)iOS部分代码:-(IBAction)saveButton:(id)sender{NSString*strURL=[NSStringstringWithFormat:@"http://mydomain.com/iOS/Tulon/phpFile.php?name=%@&email=%@",n

ios - 请求失败 : unacceptable content-type: text/plain using AFNetworking 2. 0

我在使用AFNetworiking2进行请求时遇到了问题。我在我的sharedInstance类方法中有我的AFHTTPSessionManager自定义sharedInstancesharedInstance.responseSerializer=[AFJSONResponseSerializerserializerWithReadingOptions:3];sharedInstance.responseSerializer.acceptableContentTypes=[sharedInstance.responseSerializer.acceptableContentTypes

iphone - ASIFormDataRequest 空 POST 请求

我正在使用ASIFormDataRequest将多部分POST数据发送到运行nginx+php-fpm的服务器。ASIFormDataRequest*request=[ASIFormDataRequestrequestWithURL:url];[requestsetPostValue:sessionKeyforKey:@"session"];[requestsetPostValue:secretforKey:@"secret"];[requestsetPostValue:@"test"forKey:@"description"];[requestsetFile:filePathforK

ios - authorize.net ios sdk 中的 "The authentication type is not allowed for this method call"错误

我正在尝试在我的应用程序中使用授权iossdk作为支付网关。我已成功集成,但测试帐户出现上述错误。AuthNet*an=[AuthNetgetInstance];[ansetDelegate:self];CreditCardType*creditCardType=[CreditCardTypecreditCardType];creditCardType.cardNumber=@"38000000000006";creditCardType.cardCode=@"100";creditCardType.expirationDate=@"121213";PaymentType*paymen

ios - 使用swift 3发送post请求(自签名证书问题)

我正在尝试将用户选择的一些数据发送到位于不同网络上的LAMP服务器上的mysql数据库。最近我在自己的机器上下载了一个服务器,一切正常。应用程序中的操作发送到服务器中的php文件,然后php处理将其发送到mysql数据库。最近我获得了访问我们需要使用的服务器的权限。现在,当我尝试做同样的事情时,我收到一条错误消息,指出该服务器的证书无效。我知道以前我处理的是http,现在它需要是https,但我不清楚我应该如何更改它以使其正常工作。我在这里看到很多关于如何做到这一点的不同回应,但他们经常被诸如“这是一种解决方法”或“该应用程序可能被拒绝”等评论所反驳。这是我当前的功能:funcsend

ios - 更新到 Swift 3.0 : Contextual type 'AnyObject' cannot be used with dictionary literal

我正在将我的代码库更新到Swift3.0,但我不知道如何修复我在迁移时生成的错误:“上下文类型‘AnyObject’不能与字典文字一起使用”。任何帮助将不胜感激。typealiasJSONDictionary=DictionaryfuncinfoDict()->JSONDictionary{return["users"://thefollowinglinegeneratestheerror"Contextualtype'AnyObject'cannotbeusedwithdictionaryliteral"["add":Array(self.addUserIDs),"del":Arra