1.0.1 • Published 7 years ago

post-json-for-jquery v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

jQuery.postJSON()

Description: Load JSON-encoded data from the server using a POST HTTP request.

jQuery.postJSON( url , data )

url
Type: String
A string containing the URL to which the request is sent.

data
Type: PlainObject or String
A plain object or string that is sent to the server with the request.

success
Type: Function( PlainObject data, String textStatus, jqXHR jqXHR )
A callback function that is executed if the request succeeds.

This is a shorthand Ajax function, which is equivalent to:

$.ajax({
  type: "POST",
  dataType: "json",
  url: url,
  data: data,
  success: success
});

It is very similar to $.getJSON with only diffrence that it is sending POST request. You can check documenation for $.getJSON [here].

Changelog

  • 1.00
    • postJSON now properly sets it's content type to JSON.
1.0.1

7 years ago

1.0.0

7 years ago

0.9.5

7 years ago

0.9.4

7 years ago

0.9.3

7 years ago

0.9.2

7 years ago

0.9.1

7 years ago

0.9.0

7 years ago