Set content type

This commit is contained in:
Wout Schellaert 2018-04-27 04:05:25 +02:00
parent 1474cd118f
commit 8f3ab2a0dc
2 changed files with 8 additions and 2 deletions

View file

@ -1,6 +1,11 @@
$ '.send'
.click ->
$context = $ this
$.ajax "https://kelder.zeus.ugent.be/messages",
$.ajax
# url: "http://localhost:8080/"
url: "https://kelder.zeus.ugent.be/messages/",
contentType: "text/plain",
type: "POST"
data: $ '.chatbox'
data: $('.chatbox').val()
success: $('#chat-response').text('Success! :)')
error: $('#chat-response').text('Error !1!')

View file

@ -68,6 +68,7 @@ title: Cammie
</div>
</nav>
<div class="columns">
<p id="chat-response"></p>
<div class="field has-addons ">
<div class="field control">
<input class="input chatbox" type="text" placeholder="Zeus is de max!">