get
$(location).attr('href', 'http://'+window.location.host+'/api/v1/sample/excel');
post
var jForm = $("#frm");
jForm.attr('action', 'http://localhost:8080/api/v1/sample/excel');
jForm.attr('method', 'post');
jForm.submit();