Explanation of NSMutableURLRequest : setHTTPMethod

Posted by kkmoslehpour on Stack Overflow See other posts from Stack Overflow or by kkmoslehpour
Published on 2014-06-10T21:05:22Z Indexed on 2014/06/10 21:25 UTC
Read the original article Hit count: 131

Filed under:
|
|
|
|

I am new to objective c programming. I am currently trying to insert data into mysql database. I have read a couple links on this and could not find the exact answer I am looking for.

Here is what I am trying to do:

I have my app that user inputs a name in a text field and once the press the add button, it makes a connection to my php file and my php file does the rest of the work (using POST method) and adds the name to the mysql dataase.

I have seen a lot of people use NSMutableURLRequest : setHTTPMethod :POST`` in their code (in my case my php file does that and I don't haveNSMutableURLRequest` included in my code and it works perfectly fine.)

My questions are:

  • Are there any benefits of including NSMutableURLRequest in your code when you can just call your php code to take care of the POST for you?
  • What does NSMutableURLRequest exactly do and which way is more efficient?

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql