Skip to content

DALI-sync requires both GET and POST #50

@pdowler

Description

@pdowler

The description of DALI-sync is intended to specify that an endpoint has to treat GET and POST requests equally. This was common practice in earlier protocols that was refactored (pulled out) to DALI.

context: I am thinking about TAP-next and OpenAPI work but this is generally applicable.

As I recall, the use cases are:

  1. GET allows for a clickable link (web page, email, etc) that invokes a service
  2. POST allows a standard form (web page) to invoke a service (with user input)
    (both without any client code like javascript)
  3. client software can be easily written to invoke the service

We also need to evolve to formulate more complex requests (service invocations)...

However, this requirement kind of forces us into certain implementation details (url-encoding, application/x-www-form-urlencoded, etc - see #40 for more gory details) that start to cause pain when we want to declare APIs using something like OpenAPI and loosely couple the payload on the wire (e.g. to chose something with more structure like json).

At a minimum, this requires a fair bit of duplication in an OpenAPI spec, but I think that the idea of separating the wire protocol (payload delivered) means the above basic use cases 1 and 2 become large obstacles to moving forward and I feel it is only partly the generic browser client (no javascript) but also trying to have both GET and POST.


aside: In the VOSpace spec these request APIs are generally "POST a document to endpoint" and it isn't that hard. We (misguidedly) added some "GET with params" for what we thought were simple use cases we could optimise, but then when we write clients we completely ignored them in favour of the core API behaviour.

Metadata

Metadata

Assignees

No one assigned

    Labels

    futureKeep track of this for the future

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions