TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sachin Singh
7
55.8k
81.7k
How JsonP media type formatter actually works?
Sep 5 2020 12:17 AM
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) {
},
})
}
Obvioulsy , web API would be sending jsonp formatted data otherwise browser would not allow it , My question is, i have not defined any callback function to get Jsonp data and Success function is getting json object, how is the whole process working?
It seems as if web api is sending plain Json object without wrapping it in function , how?
Reply
Answers (
2
)
how to check a table is empty and if it is empty drop table?
Read Digital Signature USB Tokken From Web browser