Advertisement
dwhitzzz

Postman send json for all your request as default

Sep 26th, 2019
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. Postman App>
  2. Collections >
  3. New Collection >
  4. Pre-request Scripts >
  5. Paste this >
  6. pm.request.headers.add({key: 'Accept', value: 'application/json' });
  7. pm.request.headers.add({key: 'Content-Type', value: 'application/json' });
  8.  
  9. New collection name>
  10. Add request >
  11. Choose your name >
  12. Call your ws>
  13.  
  14. Every call will now use the json format!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement