I am writing a script that pulls JSON data from xyz.site and puts into site.xyz
Here I am able to pull data from xyz.site through jQuery's $.getJSON but I am facing a issue while making a put/post request.
You should use jQuery ajax method and specify type option as PUT or POST
$.ajax({
url: 'url', // your api url
// jQuery < 1.9.0 -> use type
// jQuery >= 1.9.0 -> use method
method: 'PUT', // method is any HTTP method
data: {}, // data as js object
success: function() {}
});