[haiku-depot-web] Re: API Over-HTTP Protocol

  • From: Ryan Leavengood <leavengood@xxxxxxxxx>
  • To: haiku-depot-web@xxxxxxxxxxxxx
  • Date: Sat, 28 Sep 2013 17:09:00 -0400

On Sat, Sep 28, 2013 at 4:53 PM, Scott Jacovidis <scottybe2012@xxxxxxxxx> wrote:
>
> The only thing I still would like to have more information on is the types
> of requests that are coming from the HaikuPM application.  What ways of
> extracting information from a stream is easiest in C++ for you?   Have we
> discussed an exact API or set of things that the HaikuPM needs somewhere?

I think JSON over a REST-style API makes the most sense in that is
generally the way web APIs are done now, and having support for that
in Haiku opens doors to accessing many other online APIs.

There are plenty of options for C/C++ JSON libraries, and the Haiku
Services Kit should be made to support the various ways of accessing
REST APIs, including whatever the standards are for emulating PUT and
DELETE when those methods aren't available (such as the
X-HTTP-Method-Override HTTP header.) Though I think generally most
servers support those methods, it is the browsers that lack support,
and we can make sure that is not the case with our Services Kit and
WebPositive (eventually.)

Plus using JSON over REST will allow other people to access this API,
or frankly just the HTML front-end we also want to create (which
Andrew and I think could be a single page front-end using AngularJS.)

-- 
Regards,
Ryan

Other related posts: