I am triggering the below crossdomain JSONP call from javascript using ajax:
$.ajax({
url: 'https://xyz.abc.com/xxx/xxx/client',
type: 'POST',
dataType: 'jsonp',
jsonpCallback: 'callback',
data:{ id: '123456' },
crossDomain: true,
contentType: 'application/jsonp'
});
Below are the Query string parameters as seen from the network tab:-
callback=callback&id=123456&_=1498907401152
But due to security and to prevent vulnerability I want to do this call from Java end. How can I do an equivalent JSONP call as posted above from java end? I am using a Struts2 action class.