Ios 是否有API在数据库上执行POST请求?

Ios 是否有API在数据库上执行POST请求?,ios,objective-c,Ios,Objective C,我要发送到服务器的数据的格式为- id : patient ID email : patient Email password: patient password datesel:Date selection description:Description of document name:Name of Document type:document type image:uploaded file(can be image or file) 输出 {data:{status=0/1,mess

我要发送到服务器的数据的格式为-

id : patient ID
email : patient Email
password: patient password
datesel:Date selection
description:Description of document
name:Name of Document
type:document type
image:uploaded file(can be image or file)
输出

{data:{status=0/1,message:"   "}}
是否有一个现有的API来执行此操作?如果没有,我如何上传带有图像的数据


谢谢

您可以使用
NSURLConnection
向服务器发送POST请求。您应该联系提供服务器的一方,询问他们是否有用于此目的的API。如果他们使用JSON,您可以使用
NSJSONSerialization
或第三方库来帮助您构建消息。图像可以作为Base64编码字符串包含,但我们需要有关服务器API的更多信息来真正帮助您。

Glorfindel是正确的。首先,这一切都取决于服务器端。他们使用什么类型的API?他们可以接收什么类型的数据? NSJSONSerialization是向服务器发送数据的好方法。您可以将图像作为Base64编码字符串发送。服务器需要对其进行解码并相应地保存

访问此链接