3 ms·
I'm sorry, maybe my ignorance is showing here, but in the example, aren't they pretty much just describing a cgi? for example... example.com/cgi-bin/gettaxes.
by blhack 17y ago
I'm sorry, maybe my ignorance is showing here, but in the example, aren't they pretty much just describing a cgi?
for example...
example.com/cgi-bin/gettaxes.cgi?state=AZ&longzip=85251&ammount=82521&trans_id=23894
which returns some text?
Am I totally missing the point here?
- natrius 17y agoI think his explanation is just wrong. My understanding is that the web app says, "Hey, if you give us a URL, we'll POST (or GET, PUT, etc) these parameters to it whenever a certain event happens." On your machine, you just set up a script at the URL. Then whenever someone you follow on Twitter tweets, for example, Twitter will POST user=blhack&tweet=My%20spoon%20is%20too%20big to the URL you gave them. That effectively gives you a push API instead of the conventional pull APIs. http://webhooks.pbworks.com/ http://webhooks.pbworks.com/
- Tichy 17y agoStill, I don't see how "webhooks" help? Isn't it equivalent to having two webservices, one having a method for registering URLs?
- natrius 17y agoYou do have two web services. If you wanted to implement what I described today, you'd have to periodically poll Twitter's API or RSS feed for data. With web hooks, there's no more polling. Twitter calls your web service when there's new data. Actually, now that I explain it that way, it doesn't seem that revolutionary. It just makes building neat hacks a tiny bit easier.
- blhack 17y agoI think you just got buzzworded, ;-)... It sounds like this magical "push" thing already exists. It is called "get" and "post". For example, my website is a stupid news aggregator (http://www.gibsonandlily.com http://www.gibsonandlily.com). If a story gets more than ~30 points (which is really rare since there are only a few people that post there), it calls up tinyurl and says: "Hey...tinurl, if you wouldn't mind, could you please give me a tinyurl of this link so that I can post it to twitter?" Tinurl responds "Hey, I'M TOO BUY POSTING TO TECHCRUNCH, GO AWAY!" To which my server says "But c'mon, tinurl...pleaaaseeee????" Tinurl: "Fine, here, no go AWAY! Also, aren't I frigging revolutionary?!" Then it calls up twitter and says "Hey, uhm...brah, like zomfg wutcha doin? Check out this uber link!" and twtitter posts it. This isn't some revolutionary "push" feature, this is just standard cgi action. It sounds like this is the same thing, just in reverse...which really isn't that "revolutionary", more like "duh".
- natrius 17y agoWhat you're describing is a pull, so yes, a push would be that in reverse. Polling is inconvenient. Web hooks aren't "revolutionary", but they're still cool.