json - How to send an equivalent of a curl command from a javascript file? -
i have been looking @ post: javascript post request form submit
and have different situation. have curl command works:
curl -v -x post -h "application/json" -h "content-type: application/json" -d 'some json' http://127.0.0.1:9010/api/kpi but need put sort of thing javascript file , breaks.
could please me create in javascript?
thanks!
javascript doesn't have curl, closest equivalent ajax. cannot make post (ajax) request in javascript domain other current page's domain, considered cross-site scripting.
Comments
Post a Comment