GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Embed Notice

HTML Code

Corresponding Notice

  1. Embed this notice
    pistolero :thispersondoesnotexist: (p@freespeechextremist.com)'s status on Tuesday, 26-Jul-2022 05:35:12 JSTpistolero :thispersondoesnotexist:pistolero :thispersondoesnotexist:
    in reply to
    • Haelwenn /элвэн/ :triskell:
    @lanodan

    > can you send something like a bug report?

    The gitlab 500s for me when I try to use it logged in, but the quick version is the same thing I've been complaining about a while, essentially /notice vs. /objects, and what you get back if you GET /users/p.

    These already work correctly and do more or less what you want:

    * "Accept: application/json" returns JSON
    * "Accept: application/ld+json" returns JSON
    * "Accept: application/activity+json" returns JSON
    * "Accept: application/activity+json;q=0.9, text/html;q=0.1" returns JSON
    * "Accept: application/activity+json;q=0.1, text/html;q=0.9" results in an attempt to load the webapp

    These are the cases that are upsetting:

    * "Accept: application/json, */*" results in an attempt to load the webapp
    * "Accept: application/activity+json;q=0.9, */*;q=0.1" results in an attempt to load the webapp
    * "Accept: application/*" results in a 302
    * "Accept: */*" returns an attempt to load the webapp

    I don't think it's possible to get a 405 or 406 out of Pleroma. I don't think it should be the case that it attempts to *just* load the webapp, I think it should return HTML with the content on the page and the script tags that load the webapp, that way the resource is at least represented.

    Right now I'm just parsing JS but I plan to parse HTML (so as to make it easier for this to work properly: https://www.infoq.com/presentations/web-api-html/ ; I've done that kind of API before and the result is exceedingly pleasant).

    > There is way worse for Accept header stuff btw

    That is why PeerTube got S-tier. I played "Guess the magic string" for a while and then made a ranty post.
    In conversationTuesday, 26-Jul-2022 05:35:12 JST from gnusocial.jppermalink

    Attachments

    1. Building Hypermedia APIs with HTML
      Jon Moore discusses the pros and cons using HTML for an API media type, as well as the particulars of implementation patterns, from representations to building programmatic HTML clients.
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.