Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Send Data Using Fetch With Then Syntax


	fetch('/test', {method:"POST", body:JSON.stringify({name:"NAME"}), headers: {'Content-type': 'application/json; charset=UTF-8'}})
    .then(response => response.json())
    .then(data => console.log(data.name));
/*console log 'Name'*/
 
PREVIOUS NEXT
Tagged: #Send #Data #Using #Fetch #With #Then #Syntax
ADD COMMENT
Topic
Name
7+2 =