I am encountering an issue where the header values I'm trying to post to the server are not properly embedded in the request header, resulting in incorrect answers. I understand that there is a mistake in my approach, but I can't seem to pinpoint it. Here's the snippet of code causing the problem:
checkMobileNo (mob: any): ng.IPromise<ng.IHttpPromiseCallbackArg<any>>{
var config: ng.IRequestShortcutConfig = {
headers: {
MobileNo : mob,
DeviceFlag : 'WebOS'
}
};
return this.$http.post("http://abcd.com/api/DemoWebAPI/IsValidMobileNo", config)
}
I have made sure to include the proper reference path in the code as well.