Guest User

Untitled

a guest
Dec 16th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. import Cookies from "universal-cookie";
  2.  
  3. const cookies = new Cookies();
  4. cookies.set("token", token, {
  5. expires: 7, // 7 days
  6. path: "/"
  7. //,secure: true // If served over HTTPS
  8. });
  9.  
  10. fetch("http://192.168.0.115:3000/myTransactions/", {
  11. credentials: "same-origin",
  12. method: "POST",
  13. headers: {
  14. Accept: "application/json",
  15. "Content-Type": "application/json"
  16. }
  17. })
Add Comment
Please, Sign In to add comment