News for hackers. Stuff that matters.
Re:HTTP 402 – Payment Required by spindritf on Friday June 06, 2014 @08:34AM (#7857481)
Not really useful until there's an integrated way for paying for a piece of content. Which most people probably won't use anyway, see: http auth.
Re:HTTP 402 – Payment Required by jakio on Friday June 06, 2014 @08:49AM (#7857540)
Still useful for API's with mixed (paid & free) content, so you can keep a uniform URL structure.
Re:HTTP 402 – Payment Required by NathanKP on Friday June 06, 2014 @09:14AM (#7857642)
This is exactly what I've used the 402 code for. Some API routes are available to all users, but others require paid access. If a freemium user attempts to access API routes behind the "paywall" I return the 402 code.
Re:HTTP 402 – Payment Required by michaelmior on Friday June 06, 2014 @08:49AM (#7857538)
This gives more information than a 401 or 403, but agreed that it's use is still limited. Would make sense to return a 402 along with a redirect to a payment page.
Re:HTTP 402 – Payment Required by mhurron on Friday June 06, 2014 @09:31AM (#7857722)
> return a 402 along with a redirect

So a 3xx error.

Re:HTTP 402 – Payment Required by garfij on Friday June 06, 2014 @10:02AM (#7857891)
I think a 402 with a typed "Link" response header field of "payment" (per http://tools.ietf.org/html/rfc5988) would probably be the most appropriate no?
Re:HTTP 402 – Payment Required by wprl on Friday June 06, 2014 @11:51AM (#7858607)
Excellent observation.
Re:HTTP 402 – Payment Required by ivoras on Friday June 06, 2014 @11:01AM (#7858249)
> Not really useful until there's an integrated way for paying for a piece of content.

Bitcoins could be the solution here.