How To Do CRUD Operations in WEBAPI in asp.net using AJAX

523 views Asked by At

I would like to perform CRUD Operations on WEB API in asp.net using AJAX JQuery.I am very new to web api

1

There are 1 answers

0
Rajat On

The Following Code can be used to hit a web api with a GET Request

    var url1 = 'http://api.com/customer/1234';

    $.ajax({
        url: url1,
        type: 'GET',
        headers: {
            'customHeader': 'Value',
            'customHeader2': 'Value2'
        },
        success: function (data) {
            alert('Success');
        }
    });