Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- curl -v -X POST
- https://app.dominodatalab.com/MYURL
- -H 'Content-Type: application/json'
- -H 'X-Domino-Api-Key: YOUR_API_KEY'
- -d '{"parameters": [ "FOO", "BAR", "ETC"]}'
- import requests
- response =
- requests.post("https://app.dominodatalab.com/MYURL",
- headers = {
- "X-Domino-Api-Key": "YOUR_API_KEY",
- "Content-Type": "application/json"
- },
- json = {
- "parameters": ["FOO", "BAR", "ETC"]
- }
- )
- print(response.status_code)
- print(response.headers)
- print(response.json())
- Meteor.methods({
- score_app: function(){
- var test = HTTP.call("POST", "https://app.dominodatalab.com/MYURL",
- { headers: {
- "Content-Type": "application/json",
- "X-Domino-Api-Key": "YOUR_API_KEY"
- },
- data: {'params': [143]
- }
- },
- function (error, result) {
- if (!error) {
- console.log("http post error")
- } else{
- console.log(result);
- };
- });
- }
- });
- result: 'You must provide a JSON object in your request body
- with a parameters key containing an array of parameters.' } }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement