Reputation: 3408
I'm currently messing with Slack integrations (https://slack.com/integrations), and trying to make one myself. I know that when my command is hit, it will POST something like this to a URL:
token=whatever
team_id=12345
channel_id=ABC123
channel_name=test
timestamp=1355517523.000005
user_id=USER123
user_name=Steve
text=googlebot: What is the air-speed velocity of an unladen swallow?
trigger_word=googlebot:
I understand how this works conceptually, but I've never actually used POST before.
Let's just say I want to take this data and put it in a Google Spreadsheet or on a web page. What does the POST URL have to actually consist of? Can I just link a static URL to a file I have on GitHub? Do I have to write in something like PHP, or would JavaScript do? How do I actually take in this input?
Thank you so much for your help!
Upvotes: 0
Views: 203
Reputation: 7923
To make a post, you either need a browser extension, like Postman:
https://chrome.google.com/webstore/detail/postman-rest-client/fdmmgilgnpjigdojojpjoooidkmcomcm?hl=en
Or you could use an HTML form submission
http://www.w3schools.com/tags/att_form_method.asp
or a Javascript AJAX request
http://www.w3schools.com/jquery/jquery_ajax_get_post.asp
finally, you can do it on the command line, using:
curl -X POST http://example.com/test -d'postdatahere'
Upvotes: 2