T
T
Taylor_Superhero2016-03-17 21:25:35
PHP
Taylor_Superhero, 2016-03-17 21:25:35

What does the JS analogue of curl look like to send a request to the server?

There is a code to send a post to VK $post = curl(' https://api.vk.com/method/wall.post?owner_id=- '.$groups[$i].'&message='.urlencode($ zloody).'&access_token='.$token);
With what method can I implement the same thing in JS, how should it look like? What is used instead of curl?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Petr Flaks, 2016-03-19
@Taylor_Superhero

If you are talking about browser-based JavaScript, then CORS will not let you do this with the VK API by your own means. To work with the VK API through a browser, you must use the Open API .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question