2

I was wondering if there are any advantages/disadvantages in using POST/GET method in Swift 2 to send password and username to the web server in order to authenticate the user. I am working on the iPhone application that fetches data from the web. The request passes the parameters to the URL and server sends data back. I modeled the current application with Enums defining a different endpoints for each request and it would be really easy for me to model Login the same way. However, I am not sure if that is the right direction.

Luke
  • 407
  • 2
  • 10
  • 22

1 Answers1

1

So essentially GET is used to retrieve remote data, and POST is used to add/update remote data.

For security reasons, it does not make any difference. Just be sure that your connection is secured with an https certificate, and do not allow http connections.

derdida
  • 14,784
  • 16
  • 90
  • 139