Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const config = {
- method: "POST",
- body: {username: "user", password: "password"}
- };
- console.log(body, "<= body we sent", config, "<=config");
- fetch(`http://localhost:8080/api/v1/esrap/login`,
- config).then(function(response) {
- console.log(response, "response");
- return response.json();
- }).then(function(data) {
- console.log("data=>", data);
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement