Add multiple methods of fetching data from the API
Currently, all of the API request examples are using CURL. More examples using Javascript libraries like axios or the fetch API would help the users implementing web apps with PostgREST (e.g. this gitter comment)
We could use code tabs with a CURL default to organize the methods.
Great idea!
Currently, all of the API request examples are using CURL
Actually the examples are not even using CURL, just an HTTP snippet that's not easily translatable to CURL in many cases. For example, the POST/PATCH requests require extra arguments from curl.
So +1 to having a real curl snippet as the default.
Just the current HTTP snippets plus CURL calls would be a good start.
Another advantage of having curl calls is that our references would be testable(ref https://github.com/PostgREST/postgrest-docs/issues/371).
Edit: Related to https://github.com/PostgREST/postgrest-docs/issues/349
Closing this since we already have curl snippets https://postgrest.org/en/stable/references/api/tables_views.html.
axios or other libs are looking like much work for now.