forked from MarseyWorld/MarseyWorld
twentyone: set xhr header so we get errors back as JSON
parent
0dd956ae0e
commit
15460fb6e7
|
@ -4,6 +4,7 @@
|
|||
<script>
|
||||
function makeBlackjackRequest(action) {
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.setRequestHeader('xhr', 'xhr');
|
||||
xhr.open("post", `/casino/twentyone/${action}`);
|
||||
xhr.onload = handleBlackjackResponse.bind(null, xhr);
|
||||
xhr.blackjackAction = action;
|
||||
|
|
Loading…
Reference in New Issue