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

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -