home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1499604066

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions issue performed_via_github_app
https://github.com/simonw/datasette/issues/2054#issuecomment-1499604066 https://api.github.com/repos/simonw/datasette/issues/2054 1499604066 IC_kwDOBm6k_c5ZYiRi 9599 2023-04-06T20:47:30Z 2023-04-06T20:47:30Z OWNER

I'm contemplating a new approach: using a class with static methods. Something like this:

```python class TableView(MethodRouter): @staticmethod async def get(request): return Response.text("GET")

@staticmethod
async def post(request):
    return Response.text("POST")

`` So effectively the class is just there to bundle together verb implementations, and to provide aroute(request)` method which knows how to dispatch them to the right place.

It can offer default HEAD and OPTIONS methods too.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
1657861026  
Powered by Datasette · Queries took 1.242ms · About: github-to-sqlite