Hello, I am trying to implement webhooks, but I am encountering some issues.


As you can see I have 1 developer user added, and I have also managed to get my site enabled. I used Generate Access Token, so that's why I didn't go through the OAuth process.
<%
import Foundation
import SwiftEngine
import SwiftyJSON
let reqVal = Request.server["REQUEST_METHOD"] ?? ""
if(reqVal == "GET")
{
let params = Request.get
let challengeCode = params["challenge"]!
Response.write(challengeCode);
}
else
{
var path = "data.txt"
let text = "some text"
try! text.write(toFile:path, atomically: false, encoding: String.Encoding.utf8 )
Response.write("Done");
}
%>
Above is my code. Upon a GET request it validates the Webhook by echoing the Dropbox challenge.
The else clause handles every other HTTP request, and thus should handle the POST notification that is supposed to be sent upon a file change; this isn't working. Essentially, upon a POST the code will write to a file in the current local directory of my server (not dropbox) called data.txt. I used Charles to see if it was just Dropbox or if the handler wasn't working.

the POST succeeded and wrote to the file as expected. For that reason, I think I either misunderstood something when reading the docs or Dropbox isn't even making a request for some reason. Any help on this would be much appreciated.