Skip to content

Instantly share code, notes, and snippets.

Created July 3, 2017 14:46
What would you like to do?
Helper function to call a web service
// Helper function to call the web service controller
app.makeAjaxCall = function (command, params, callback, error) {
var dataToPassToService = {
Command: command,
Params: params
url: '../../api/WebService',
type: 'POST',
data: JSON.stringify(dataToPassToService),
contentType: 'application/json;charset=utf-8'
}).done(function (data) {
}).fail(function (status) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment