XMPP JavaScript Library

Cakephp isAjax and AngularJS issue

JavaScript, Sachin Puri, 2017-01-31 22:27:29

 

If you are using Angular JS to send AJAX request and Cakephp isAjax function is not considering this request as AJAX then may be this can help you.

In you request add following header


headers:{'X-Requested-With':'XMLHttpRequest'}

Example

$http({method:'GET',url:'http://www.somedomain.com/',headers:{'X-Requested-With':'XMLHttpRequest'}}).success(function(data){

    //Write your code here to handle response data

}}]);

 

Add Your Comment
   
    Yes! I want to receive all comments by email

  by cheap_viagra on 16-Feb-2019 07:17 am
  • Reply
  •  0 Like
  •  0 Dislike
  • Report
  by cheap_viagra on 14-Feb-2019 11:39 pm
  • Reply
  •  0 Like
  •  0 Dislike
  • Report
  by buy_viagra on 14-Feb-2019 05:13 am
  • Reply
  •  0 Like
  •  0 Dislike
  • Report
  by super on 07-Feb-2019 02:50 am
  • Reply
  •  0 Like
  •  0 Dislike
  • Report
  by cialis_online on 01-Feb-2019 02:39 am
  • Reply
  •  0 Like
  •  0 Dislike
  • Report
  by canadian_cialis on 22-Jan-2019 04:12 am
  • Reply
  •  0 Like
  •  0 Dislike
  • Report
  by viagra_online on 21-Jan-2019 03:20 pm
  • Reply
  •  0 Like
  •  0 Dislike
  • Report
  by viagra_cheap on 03-Jan-2019 01:52 am
  • Reply
  •  0 Like
  •  0 Dislike
  • Report
  by cialis_online on 28-Dec-2018 02:01 pm
  • Reply
  •  0 Like
  •  0 Dislike
  • Report
  by viagra_online on 28-Dec-2018 01:15 am
  • Reply
  •  0 Like
  •  0 Dislike
  • Report