From 4af25f6ee07fb3b0a3b4dfbb5f46b0528e994b65 Mon Sep 17 00:00:00 2001 From: Josh Thompson Date: Sat, 8 Jun 2019 17:20:40 -0600 Subject: [PATCH] Update README with example params submission --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/README.md b/README.md index 1a67d18..756eab5 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,38 @@ Action: forward("http://example.com/email_processor") ``` +#### Notes on testing + +If you want to test the functionality of the route, via `rspec` or `minitest` or in Postman, please note that the `to`, `from`, `bcc` and `cc` params you post _must_ be capitalized: + +This would _not_ work: + +```json +{ + "recipient": "recipient@domain.com", + "from": "this wont work ", + "to": "to@domain.com", + "subject": "griddler-mailgun", + "body-plain": "This is some text body", + "body-html": "Supports HTML as well." +} +``` + +On the other hand, this would: + +```json +{ + "recipient": "recipient@domain.com", + "From": "this wont work ", + "To": "to@domain.com", + "subject": "griddler-mailgun", + "body-plain": "This is some text body", + "body-html": "Supports HTML as well." +} +``` +You can explore the expected fields and capitalizations in the [`Griddler::Mailgun::Adapter#normalize_params`](https://github.com/bradpauly/griddler-mailgun/blob/master/lib/griddler/mailgun/adapter.rb#L15) method. + + ## More Information * [mailgun](http://www.mailgun.com)