How do we get the JSON data using HTTP requests?
(A)
jQuery.getScript( url, [callback] )
(B)
jQuery.post( url, [data], [callback], [type] )
(C)
jQuery.post( url, [type] )
(D)
jQuery.getJSON( url, [data], [callback] )
Answer: (D)
Explanation:
jQuery.getJSON fetches the encoded JSON data from the server with the help of an HTTP request. The jQuery.getJSON takes 3 parameters as URL, data, callback, and it It returns XMLHttpRequest object.
Quiz of this Question
Please comment below if you find anything wrong in the above post
Article Tags :
Recommended Articles