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