title: API request times out ONLY if I pass parameters
body: <p>I am trying to figure out why any time I pass valid json to my server for a GET request the connection times out. I do not have any problems passing json to my server in any other request type other than GET... I've tested the server-side code locally and the queries work as expected.</p>
  
  <p>I want to fetch a specific user from my database and I need to pass in a username, so I send the username to the server. </p>
  
  <p>The error I keep getting (If I don't send any paramaters to the server, and just return current_user, it works and I don't get this error)</p>
  
  <pre><code> Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={NSUnderlyingError=0x604000454c40 {Error Domain=kCFErrorDomainCFNetwork Code=-1001
  </code></pre>
  
  <p>Here is the part of the API call code where I set the request type and values to send to the server, in case:</p>
  
  <pre><code>let request = NSMutableURLRequest(url: url as URL)
      request.setValue("application/json; charset=utf-8", forHTTPHeaderField: "Content-Type")
      request.httpBody = jsonData
      request.httpMethod = "GET"
  </code></pre>
  
  <p>Server set up, just in case it matters: 
  <br>
  Digitalocean droplet, Linux, Ubuntu 16.04, Nginx</p>
  
  <p><b>EDIT/ UPDATE</b><br>
  If I change the method from a GET to a POST (and keep the server code exactly the same), the server sends the correct data back immediately.</p>
  
  <p>The server side code for this is very short, so I really don't see how it can be timing out due to optimization:</p>
  
  <pre><code>user = UserModel.find_by_username(data['username'])
  
      if user:
          return {"response": [user.json()]}, 200
      return {"response": "user not found"}, 404
  </code></pre>
  
  <p>It really seems as if we can't send json via a GET method. It doesn't seem to work on both a simulator nor an actual device...I saw a similar SO post where someone commented exactly what I'm experiencing. Changing GET to POST was the fix....but it is a GET request, so why wouldn't this work?</p>