Re: api.scheme.org and CORS
Jakub T. Jankiewicz 05 Mar 2021 13:59 UTC
What is the status of API sub domain and CORS? I just opened the URL and it
return:
502 Bad Gateway
Was this working? I don't remember. Can this endpoint just return some
default website with <title>Scheme.org API</title> and with CORS enabled?
Was any work done for the API website? I plan on writing a blog post where I
would like to use example of calling
(fetch "https://api.scheme.org")
This can also be used as example for try.scheme.org. Gambit allow to open
input files as URLs. Using example with website that is guarantee to not
disappear, it is wise thing to do.
On Sat, 5 Dec 2020 15:00:19 +0200
Lassi Kortela <xxxxxx@lassi.io> wrote:
> > Will api sub domain return S-Expressions with data like most API send
> > JSON?
>
> We looked at the problem last year and earlier this year, and GraphQL
> would seem to be a good fit for the API. If we go with something else,
> we'll be re-inventing ad hoc solutions to many of the problems that it
> has already solved in a generic way.
>
> An alternative S-expression syntax for making GraphQL queries would be
> nice. The query results are ordinary JSON, which we could map to
> ordinary S-expressions in the same way that SRFI 180 does.
>
> > What kind of data you want to expose with the API?
>
> IMHO almost everything that anyone wants to include in there. We can add
> things piecemeal.
>
> > It would be nice if the api use CORS[1] headers, so you can use the api
> > from Browser's JavaScript. I think it would be nice example for my Scheme
> > interpreter, how easy is to interact with S-Expr API. There will be not
> > much of use of the API in browser if it's restricted and you need to use
> > server proxy script just to use it.
> >
> > [1] https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
>
> Sounds like a good idea. It would definitely be useful to access the API
> from in-browser JS. For starters, much functionality on other scheme.org
> subdomains could be implemented by querying the API either client-side
> or server-side.
--
Jakub T. Jankiewicz, Web Developer
https://jcubic.pl/me