Last active
April 24, 2016 00:15
-
-
Save irvifa/d681f276470d29ed791e60b91f3163fd to your computer and use it in GitHub Desktop.
fishbit2016
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
data = {"port":"merak", "depart":"24/04/2016-17:30", "arrive":"24/04/2016-18:30", "ship_id":1, "crew_id":1, "fish_id":"kakap"} | |
response = requests.post('http://localhost:5000/api/v01/tap/post', json=data) | |
print response.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var settings = { | |
"async": true, | |
"url": "http://127.0.0.1/api/v1/sessions", | |
"method": "POST", | |
"headers": { | |
"content-type": "application/json", | |
}, | |
"data": '{ "session": { "username": "user2", "password": "user2" } }' | |
} | |
$.ajax(settings).done(function (response) { | |
console.log(response); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment