Untitled

mail@pastecode.io avatar
unknown
javascript
2 years ago
354 B
5
Indexable
Never
fetch("http://127.0.0.1:8080/users/register", {
    method: "POST",
    body: JSON.stringify({
        cargo:    1,
        nome:		"TestAPI",
        email:	user,
        senha:	password
    }),
    headers: {
        "Content-type": "application/json; charset=UTF-8"
    }
}).then(response => response.json()).then(json => console.log(json));