-
Awesome extension! But I encountered a problem about JSONP;
Data structure like this:
![2fb6357a-98fd-4eb6-a350-2b2cecc12de2](https://cloud.githubusercontent.com/assets/4194287/22182169/5f452b4c-e0d…
-
```
E.g.
expect().body("root.child", equalTo("x")).when("/jsonp?callback=y");
But perhaps it's better/easier to do something like:
expect().jsonp("callback", "y").body("root.child",
equalTo("x"))…
-
```
E.g.
expect().body("root.child", equalTo("x")).when("/jsonp?callback=y");
But perhaps it's better/easier to do something like:
expect().jsonp("callback", "y").body("root.child",
equalTo("x"))…
-
```
E.g.
expect().body("root.child", equalTo("x")).when("/jsonp?callback=y");
But perhaps it's better/easier to do something like:
expect().jsonp("callback", "y").body("root.child",
equalTo("x"))…
-
http://jsfiddle.net/chufol/SrQqP/
http://stackoverflow.com/questions/19035557/jsonp-request-error-handling
https://forum.jquery.com/topic/jquery-ajax-with-datatype-jsonp-will-not-use-error-callback-i…
-
```
E.g.
expect().body("root.child", equalTo("x")).when("/jsonp?callback=y");
But perhaps it's better/easier to do something like:
expect().jsonp("callback", "y").body("root.child",
equalTo("x"))…
-
JSON是一种基于文本的数据交换方式,或者叫做数据描述格式,简洁,通俗易懂
当一个网页在请求JavaScript文件时则不受是否跨域的影响,凡是拥有”src”这个属性的标签都拥有跨域的能力,比如、、
所以我们这里运用了script标签的跨域能力,让它用一个callback函数包裹着一段JSON格式的数据,当该数据返回到前端页面的时候,我们再执行这个函数就可以把数据读取出来
### 前端代码
…
-
```
E.g.
expect().body("root.child", equalTo("x")).when("/jsonp?callback=y");
But perhaps it's better/easier to do something like:
expect().jsonp("callback", "y").body("root.child",
equalTo("x"))…
-
```
E.g.
expect().body("root.child", equalTo("x")).when("/jsonp?callback=y");
But perhaps it's better/easier to do something like:
expect().jsonp("callback", "y").body("root.child",
equalTo("x"))…
-
I've been trying to get IE8 to invoke the jsonp generalCallback, and finally I commented out lines 145 and 146:
// if this hack is used in IE10 jsonp callback are never called
145: script.event…