iphone - asihttprequest的post和get请求有什么区别?

标签 iphone ios asihttprequest

我想知道带有asihttprequest库的Get和Post之间有什么区别。

这是GET吗?

- (IBAction)sendHttpsRequest
{    
    //Set request address
    NSMutableString *databaseURL = [[NSMutableString alloc] initWithString:@"https://142.198.16.35"];

    //call ASIHTTP delegates (Used to connect to database)
    NSURL *url = [NSURL URLWithString:databaseURL];

    //This sets up all other request
    ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];

    [request setDelegate:self];
    [request startAsynchronous];
}

是您尝试在php文档中设置元素说的帖子?任何例子都很棒!

最佳答案

http://www.cs.tut.fi/~jkorpela/forms/methods.html

HTTP GET是从客户端到服务器的请求,用于请求资源。

HTTP POST是从客户端到服务器的数据上载(表单信息,图像数据等)。

您所拥有的是一个HTTP POST。

-编辑:

http://allseeing-i.com/ASIHTTPRequest/:
ASIFormDataRequest

ASIHTTPRequest的子类,用于处理x-www-form-urlencoded和multipart / form-data帖子。它使POST数据和文件变得容易,但是如果您想自己管理POST数据或根本不需要POST数据,则无需将其添加到项目中。

我不好,这是POST,而不是GET。我的其余答案都是有效的,但是:)

关于iphone - asihttprequest的post和get请求有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8393634/

相关文章:

iphone - Cocos2d & Box2d 动态光照和阴影

iphone - UITableView tableFooterView 奇怪的调整大小

iphone - 难以访问另一个 View Controller 中的对象

ios - UITableViewCell 顶部阴影被 UITableView header view 覆盖

ios - 使用 ASIHTTPRequest 将 .caf 发送到服务器

ios - iOS 中的深层链接 - 如果未安装应用程序,请导航至 Apple Store

ios - swift - 在 Controller 之间切换后更新计时器并更新标签

iOS OCMock 部分 vs 类模拟

objective-c - 将工作委托(delegate)给两个不同的委托(delegate),这可能吗?

ios - ASIFormDataRequest 请求字符串