Search
 
SCRIPT & CODE EXAMPLE
 

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));
Comment

PREVIOUS NEXT
Code Example
Csharp :: ActionExecutingContext result response return objects 
Csharp :: cors denied error in asp.net core 
Csharp :: take out substring from string 
Csharp :: use string[] args c# 
Csharp :: c# propertyinfo indexof 
Csharp :: how to use a round image unity 
Csharp :: how download file from internet and move it to folder with c# 
Csharp :: C# Move Camera Over Terrain Using Touch Input In Unity 3D 
Csharp :: how to create an initialized jtoken c# 
Csharp :: 1/1/1/1/1 
Csharp :: open full screen wpf 
Csharp :: image into sql database 
Csharp :: Derived classes of abstract class share property 
Csharp :: lambda distinct by property 
Csharp :: {} is this used for code blocks in c# 
Csharp :: taskcontinuationoptions.onlyonfaulted 
Csharp :: add two large numbers 
Csharp :: large blank file C# 
Csharp :: in clause db2 c# 
Csharp :: vb.net substring after character 
Csharp :: how to set the forgound color of listitems in c# 
Csharp :: c# half hour dropdown list 
Csharp :: Insert all data of a datagridview to database at once 
Csharp :: What is the best way to lock cache in asp.net? 
Csharp :: c# words return first 20 items of array 
Csharp :: esc exit winform 
Csharp :: how to store more precise data then float c# 
Csharp :: Garbage collect every 30 frames unity 
Csharp :: How to convert output of HttpClient PostAsJsonAsync() into user defined list of object 
Csharp :: how to update modal class using dbfirst in asp.net core 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =