sendgrid / sendgrid-java

The Official Twilio SendGrid Led, Community Driven Java API Library
https://sendgrid.com
MIT License
484 stars 408 forks source link

When I have to use "X-Test" and "X-Mock" headers? #678

Closed icarrara closed 3 years ago

icarrara commented 3 years ago

I'm sorry for the kind of issue due from my ignorance.

In many examples I see the below personalization adds:

personalization.addHeader("X-Test", "test"); personalization.addHeader("X-Mock", "true");

Do I need to put it in every API calls? If no, what is their meaning?

Thank you in advance, Ivano

shwetha-manvinkurke commented 3 years ago

@icarrara No, you don't. The X-Test is just an example and X-Mock is a prism header where you can specify the desired return status code in the tests.