Man this is kinda ugly... I feel like we should have a helper class/model to do this for us (and also that there should be a nicer way to send a JSON HTTP request), but it's fine for now.