HTTP Request in Swift with POST method

I’m trying to run a HTTP Request in Swift, to POST 2 parameters to a URL.

Example:

Link: www.thisismylink.com/postName.php

Params:

id = 13
name = Jack

What is the simplest way to do that?

I don’t even want to read the response. I just want to send that to perform changes on my database through a PHP file.

7 Answers
7

Leave a Comment