I'm using SparkPost [1] (a transactional email platform) through its API
[2].
I'm trying to implement their webhook.
I have already set up a public URL in my app to let SparkPost send a POST
each time a message is opened (that is, one of the messages I previously
sent throug the API).
The problem is that *I'm receiving the POST request, but nothing in
post_vars, no vars, nothing*.
However, the headers do include some stuff that needs to be there,
accordingly to SparkPost documentation [3].
My public function is really simple, just writes a BEAUTIFY(request) to a
log file:
def sparkpost_message_opened():
archivo = open('webhook.log', 'a')
archivo.write('------------------------------------\n')
archivo.write(BEAUTIFY(request).xml())
archivo.write('\n')
archivo.close()
return HTTP(200)
However, when I check the received data, I see that the request object
doesn't have post_vars or vars.
I think the problem could be in the SparkPost side, but I'm not sure.
How can I double check? Is there a way that I can see the post data that
was sent? I'm using nginx.
[1] https://sparkpost.com
[2] https://developers.sparkpost.com/api/
[3]
https://support.sparkpost.com/customer/en/portal/articles/2311698-comparing-webhook-and-message-event-data
Thanks in advance!
Regards, Lisandro.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.