setting header

by dmethvin

JavaScript

// HTML example
$.ajax({
    url: '/echo/html/',
    type: "POST",
    dataType: "html",
    data: {
        delay: 1,
        html: '<p class="happy">Hello world!</p>'
    },
    beforeSend: function(xhr) {
        xhr.setRequestHeader("soapaction",
            "/CatalogService/UpdateCatalogEndpoint"); 
    },                                                                
    success: function(data) {
        console.log("success! "+data);
    },
    error: function(xhr){
        console.log("error");
    }
});