JsonP wraps json data into a function , browser allows script to load from other domain so cross origin request is possible with jsonp.
However, without any Callback defined , how are we able to get Json data back in Ajax Success.
- function getEmployeeById() {
- $.ajax({
- "type": "get",
- "url": myUrl,
- "data":{Id:id},
- "dataType": "Jsonp",
- "cache": false,
- "success": function (data) {
- },
- })
- }
It seems as if web api is sending plain Json object without wrapping it in function , how?

Sachin SinghPosted Sep 5, 2020, 3:23 AM
Farhan AhmedPosted Sep 5, 2020, 12:55 AM