Advertisement
Guest User

Untitled

a guest
Mar 14th, 2019
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. const config = {
  2. method: "POST",
  3. body: {username: "user", password: "password"}
  4. };
  5. console.log(body, "<= body we sent", config, "<=config");
  6.  
  7. fetch(`http://localhost:8080/api/v1/esrap/login`,
  8. config).then(function(response) {
  9. console.log(response, "response");
  10. return response.json();
  11. }).then(function(data) {
  12. console.log("data=>", data);
  13. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement