title: How to set optional parameter in REST API's mongolab?
body: <p>I need to use upsert() for an update. The request url is shown below.</p>
  
  <p><a href="https://api.mongolab.com/api/1/databases/db/collections/col+" rel="nofollow">https://api.mongolab.com/api/1/databases/db/collections/col+</a>"?q={}&amp;u=true&amp;apiKey=key</p>
  
  <p>It results 500 Internal Server Error. Without u=true the url works fine.</p>
  
  <p>Thank you in advance</p>
  
  <p>======== UPDATE =========</p>
  
  <p>Current Solution. I send two requests. If the update request does not find any specified document, return 0, it will send another request for insert. This approach is quite expensive. Looking forward for better solution.</p>
  
  <p>Cheers</p>