Confused about the JSONP in Weather report project

Confused about the JSONP in Weather report project
0.0 0

#1

In my Random quote project,My ajax code is below and it worked:

 $.ajax({ 
  headers:{
     "X-Mashape-Key": "P635I6rEYTmsh4jWyNQz8DB7xdR9p1kDVsejsnsJDPj4jTIfMy",
      "Content-Type": "application/x-www-form-urlencoded",
      "Accept": "application/json"
    },
    url:'https://andruxnet-random-famous-quotes.p.mashape.com/',
    type:"POST",
    success:function(data){...}
})

and now l am doing the weather project,it refer to cross-origin requests,so l wanna ask why the code before worked without using JSONP?Isn’t an cross-origin request?


#2

Thank guys in advance!


#3

Can anyone help me ?Why this project dont need to use jsonp?


#4

Post your weather project code.