kayac/Gunfish

Request.Header parameters should be customizable

laouji opened this issue · 1 comments

Sending a request like the one below fails to set the Header parameters sent to the APNS server

[{
  "header": {
    "apns-topic": "com.kayac.mypackage"
  },
  "token": "XXXXXXX",
  "payload": {
    "aps": {
      "alert": {
        "body": "test"
      }
    }
  }
}]

The response in the error hook clearly shows that the header has not been set:

{"response":{"apns-id":"","status":400},"response_time":0.371444302,"request":{"header":{},"token":"XXXXXXX","payload":{"aps":{"alert":{"body":"test"}}},"tries":0},"error_msg":{"reason":"MissingTopic","timestamp":0},"resp_uid":"aaaaaaaaa"}

Thanks for merging my PR!