Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

fetch post .net

var url = 'Test/SaveReportDetail';
var username =  'example' ;

fetch(url, {
    method: 'POST', // or 'PUT'
    body: JSON.stringify(username), 
    headers: {
        'Accept': 'application/json; charset=utf-8',
        'Content-Type': 'application/json;charset=UTF-8'
    }
}).then(res => res.json())
    .then(response => console.log('Success:', JSON.stringify(response)))
    .catch(error => console.error('Error:', error));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #fetch #post
ADD COMMENT
Topic
Name
6+6 =