Skip to content

Instantly share code, notes, and snippets.

@ecarnevale
Created October 12, 2009 21:57
Show Gist options
  • Select an option

  • Save ecarnevale/208798 to your computer and use it in GitHub Desktop.

Select an option

Save ecarnevale/208798 to your computer and use it in GitHub Desktop.
$.ajax({
beforeSend: function(xhrObj){
xhrObj.setRequestHeader("Accept","application/json");
xhrObj.setRequestHeader("Content-Type","application/json");
},
contentType: "application/json",
type: "POST",
url: "http://svel.to/links",
data: '{ "links" : "http://emanuelcarnevale.com" }',
processData: false,
success: function(json){ //callback
jetpack.notification.show("url shortened");
}
});
Request Headers
Host svel.to
User-Agent Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5
Accept application/json
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive 300
Connection keep-alive
Content-Type application/json; charset=UTF-8
X-Requested-With XMLHttpRequest
Content-Length 43
Cookie _shortamai_session=BAh7BzoPc2Vzc2lvbl9pZCIlMjhlZmMzYzM0Nzc4NDk4ZGM2MDBiYTg0Y2I5NzRmN2QiCmZsYXNoSUM6J0FjdGlvbkNvbnRyb2xsZXI6OkZsYXNoOjpGbGFzaEhhc2h7BjoKZXJyb3IiLENpIHNlbWJyYSBjaGUgaWwgdHVvIHVybCBub24gc2lhIHZhbGlkbwY6CkB1c2VkewY7B1Q%3D--aa70de663d2e1f6adeb203d6236658add41e15b9
Pragma no-cache
Cache-Control no-cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment