What is the difference between post and get request for asihttprequest?

I am wondering what is the difference between Get and Post with the asihttprequest library.

Is this a 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]; } 

- message when you try to set elements in php document? any examples would be great!

+1
ios iphone
source share
2 answers

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

HTTP GET is a request from a client to a server with a request for a resource.

HTTP POST is the loading of data (form information, image data, etc.) from the client to the server.

You have an HTTP POST.

-Edit:

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

A subclass of ASIHTTPRequest that handles x-www-form-urlencoded and multipart / form-data messages. This makes sending POST data and files easier, but you don’t need to add them to your project if you want to manage POST data yourself or not need POST data at all.

My bad one, this one was POST, not GET. The rest of my answer was valid though :)

+3
source

This is the POST request, which is used by default for ASIFormDataRequest. The difference is the same as in a regular HTTP request. You can read about it here if you still don't know it.

In general, if you just upload a web page and you don’t need to send any variables to the server, a GET request is enough. If you want to send variables to your request, often since the POST request is the way to go, because it is a bit more secure and less transparent.

+1
source

All Articles