After sending a POST request from my iOS app, I get the below error. The error doesn't seem to have any effect and everything continues to run fine, but I would like to know how to remove the error (as I worry there is something not entirely right which might have negative effects later)? I am wondering it there is some way to close off the POST request and avoid the error.
at=error code=H12 desc="Request timeout" method=POST path="/test" host=my-server.herokuapp.com request_id=fea9cffc-5e67-4301-baaa-d2fd18cfd0ea fwd="95.147.171.193" dyno=web.1 connect=1ms service=30001ms status=503 bytes=0
PS: The current iOS code I use is simply
@IBAction func Test(_ sender: Any) {
let url = NSURL(string: "https://my-server.herokuapp.com/test")!
let request = NSMutableURLRequest(url: url as URL)
request.httpMethod = "POST"
URLSession.shared.dataTask(with: request as URLRequest) { (data, response, error) -> Void in
// TODO: Handle errors
}.resume()
}
even though I have also tried other versions (especially with more information in the body, which doesn't change anything).
On Heroku, I simply run
app.post("/test", function (req, res) {
console.log("Test Log")
}
which already creates the described error.
It seems I always get the same error with the POST request, there does not seem to be a problem with GET requests.