Created
          February 21, 2013 22:43 
        
      - 
      
- 
        Save thatmarvin/5009092 to your computer and use it in GitHub Desktop. 
    Demonstrating HTTP 500 response from PostageApp
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | /* | |
| Remember to fill in your API key. | |
| usage: node postageapp.js [email protected] | |
| */ | |
| var apiKey = 'FILL IN YOUR API KEY HERE', | |
| postageapp = require('postageapp')(apiKey), | |
| recipient = process.argv[2]; | |
| var payload = { | |
| recipients: recipient, | |
| content: { | |
| 'text/plain': 'é' | |
| } | |
| }; | |
| postageapp.sendMessage(payload, function (err, res) { | |
| if (err) { | |
| console.error(err); | |
| process.exit(1); | |
| } | |
| console.log(res); | |
| process.exit(0); | |
| }); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment