Skip to content
This repository has been archived by the owner on Jan 30, 2018. It is now read-only.

Commit

Permalink
Stringify data.
Browse files Browse the repository at this point in the history
  • Loading branch information
oskarihiltunen committed Nov 5, 2013
1 parent e22b4de commit e95380a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions flask_split_js/static/js/flask-split.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ FlaskSplit = (function () {
function ab_test_request(experiment_name, alternatives, callback) {
$.get(
'/split-js/ab-test',
{experiment_name: experiment_name, alternatives: alternatives},
JSON.stringify({
experiment_name: experiment_name,
alternatives: alternatives
}),
function (data) {
callback(data.alternative);
},
Expand All @@ -47,7 +50,10 @@ FlaskSplit = (function () {
function finished_request(experiment_name, reset) {
$.post(
'/split-js/finished',
{experiment_name: experiment_name, reset: reset},
JSON.stringify({
experiment_name: experiment_name,
reset: reset
}),
function (data) {},
'json'
);
Expand Down

0 comments on commit e95380a

Please sign in to comment.