I made a small server with RPS and I want to send a request from the client, I can’t find examples in nete. There is a bunch of but no net request, so guys who can tell me!
- First write the client code. - Roman C
- html with login and password entry form github.com/IhorBondartsov/OLX_Parser/tree/master/website/view - Ihor Bondartcov
|
1 answer
If you are using jquery, it is best to send json rpc requests using $.ajax() . For example
$.ajax({ type:"POST", url: "/testJsonUrl", dataType:"json", data: JSON.stringify({jsonrpc:'2.0', method:'someMethod', id:'jsonrpc'}), contentType: "application/json-rpc; charset=utf-8", success: function(response) { var result= response.result; ... } }); - Well, I would like to write on pure JS, something like I found, but it does not work! ( - Ihor Bondartcov
- What is your server? - Roman C
- Golang in turnips is userMS - Ihor Bondartcov
- Well, on it is written the server on which the view part, I try to make a request with another ms - Ihor Bondartcov
- Still there is a problem with CORS - Ihor Bondartcov
|