microsub icon indicating copy to clipboard operation
microsub copied to clipboard

GET or POST on preview

Open sebsel opened this issue 7 years ago • 3 comments

I found two implementations that do not follow spec, and use GET instead of POST on the Preview action. These are also the only implementation that use the Preview action I could find.

  • Aperture accepts GET
  • Together sends GET
  • Monocle does not support Preview yet
  • Indigenous for iOS does not support Preview yet
  • the IndieWeb module for Drupal does not support Preview yet (https://github.com/swentel/indieweb/issues/250)

sebsel avatar Nov 08 '18 20:11 sebsel

Thanks for raising this question.

Yarns Microsub Server will accept either GET or POST for preview - https://github.com/jackjamieson2/yarns-microsub-server/blob/master/includes/class-yarns-microsub-endpoint.php#L217

I think Preview, and Search for that matter, make sense as GET requests

jackjamieson2 avatar Dec 06 '18 21:12 jackjamieson2

The Drupal module now supports preview on POST and GET - same for search. I agree with @jackjamieson2 that GET seems more logical.

Next up - search and preview from Indigenous for Android. I'll be sending a GET request there as I know a lot of people are using aperture.

swentel avatar Feb 13 '19 16:02 swentel

I think my reasoning for requiring POST is that, unlike most read operations, this one will actually cause the server to go do work to fetch the URL and such. It felt like it would be more dangerous to allow that to happen on GETs, which may be easily triggered by CSRF and such, so requiring it be a POST is more explicit.

aaronpk avatar Feb 13 '19 17:02 aaronpk