Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- By default, in cross-site XMLHttpRequest invocations, browsers will not send credentials. A specific flag has to be set on the XMLHttpRequest object when it is invoked.
- C'est ce que j'ai fait :
- $.ajax({
- type: 'POST',
- url: 'http://b.epoc.fr/jsonrpc.php',
- data: data,
- username: 'ahah',
- password: '415h6dfh12reh',
- xhrFields: {
- withCredentials: true
- },
- contentType: 'application/json',
- dataType: 'json',
- success: function(response) {
- console.log(response);
- },
- error: function(xhr, type) {
- }
- });
- });
- Toujours le même message d'erreur.
Advertisement
Add Comment
Please, Sign In to add comment