title: swift3 webview with post request
body: <p>I am running a school project and I am new from swift3. </p>
  
  <p>By searching, I know how to pass a data from one view to anther:
  <a href="https://stackoverflow.com/questions/40288974/passing-data-from-a-tableview-to-webview">Passing data from a tableview to webview</a></p>
  
  <p>In the post above, he is using http get request to pass data to website, then reload the webivew:</p>
  
  <pre><code>let URL = NSURL(string: "https://www.example.com?data=\(passData)")
  webView.loadRequest(NSURLRequest(url: URL! as URL) as URLRequest)
  </code></pre>
  
  <p>I see some useful links like about code with http post request in here:
  <a href="https://stackoverflow.com/questions/26364914/http-request-in-swift-with-post-method">HTTP Request in Swift with POST method</a>. In a result, the code can print out the http response.</p>
  
  <p>My question is that, how to implement a webview with sending a http post reuqest, like id, name, etc, instead of get method.</p>
  
  <p>In anther words: I want to reload the webview(like example.com) and that website will contain the value I sent via http post request.</p>
  
  <p>example.com:</p>
  
  <pre><code>$id = $_POST['id'];
  echo $id;
  </code></pre>
  
  <p>Thanks.</p>