The Belfry
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
orhtej2@eviltoast.org to Programmer Humor@programming.devEnglish · 8 hours ago

REST my ass 💩

eviltoast.org

message-square
23
fedilink
208

REST my ass 💩

eviltoast.org

orhtej2@eviltoast.org to Programmer Humor@programming.devEnglish · 8 hours ago
message-square
23
fedilink
alert-triangle
You must log in or register to comment.
  • Rose@slrpnk.net
    link
    fedilink
    arrow-up
    2
    ·
    55 minutes ago

    Aaagh! Getting some random old person flashbacks.

    Kids. I r-remember a day… You won’t believe this… I got a 404 error page… It was otherwise a normal 404 page with a normal message on it, but it had a giant ad on it… like “while you’re here, how about you buy this stuff”… It was hell… You’ve got no idea how lucky you kids are with uBlock…

  • neuracnu@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    36
    ·
    5 hours ago

  • VeryFrugal@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    23
    ·
    edit-2
    6 hours ago
    { "ok": false }
    
    • spizzat2@lemmy.zip
      link
      fedilink
      arrow-up
      14
      ·
      edit-2
      5 hours ago
      { "ok": false }
      

      - My Chemical Romance

    • PoolloverNathan@programming.dev
      link
      fedilink
      arrow-up
      8
      ·
      5 hours ago

      { "ok": "false" }

      • Aurenkin@sh.itjust.works
        link
        fedilink
        arrow-up
        1
        ·
        50 minutes ago
        {
          "false": "ok"
        }
        
        • somerandomperson@lemmy.dbzer0.com
          link
          fedilink
          arrow-up
          1
          ·
          33 minutes ago

          $false=true

      • SkaveRat@discuss.tchncs.de
        link
        fedilink
        arrow-up
        2
        ·
        3 hours ago
        { "ok": "no" }
        
  • katy ✨@piefed.blahaj.zone
    link
    fedilink
    English
    arrow-up
    23
    ·
    7 hours ago

    error = true with no description or answer is basically ten years of searching stackoverflow and reddit threads for an answer.

  • WhiteRice@lemmy.ml
    link
    fedilink
    arrow-up
    11
    ·
    7 hours ago

    It’s not us, it’s you

    • lunarul@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      edit-2
      4 hours ago

      It’s us: 5xx

      It’s you: 4xx

  • Cruel@programming.dev
    link
    fedilink
    arrow-up
    8
    ·
    7 hours ago

    Congratulations! You failed.

  • Subscript5676@lemmy.ca
    link
    fedilink
    English
    arrow-up
    2
    ·
    4 hours ago

    Every time I see someone recommend this at work I die a little inside. Like… C’mon!

  • NotSteve_@piefed.ca
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    4 hours ago

    Marketo my beloved the bane of my existence. Actually without a doubt the worst API I’ve ever worked with in my career. The response schemas are random and a 200 means nothing because it might also include a “success”: “false”". Our backend API is Python and we have strict typing rule but Marketo really makes that difficult

  • Slotos@feddit.nl
    link
    fedilink
    arrow-up
    7
    ·
    7 hours ago

    JSON API almost always means “not REST”. In other words, it works as intended.

    • Aatube@kbin.melroy.org
      link
      fedilink
      arrow-up
      2
      ·
      6 hours ago

      how would you return metadata or more detailed error codes?

      • tempest@lemmy.ca
        link
        fedilink
        arrow-up
        3
        ·
        4 hours ago

        The argument probably goes something like " if you adhere strictly to REST the error codes are all you need" and then metadata can be sent in response headers.

        • Aatube@kbin.melroy.org
          link
          fedilink
          arrow-up
          2
          ·
          3 hours ago

          how should a REST API respond to the client sending a URL the ends in a string instead of a numeric ID? like api.social/users/ceeforayteen instead of api.socail/users/11037

          • locuester@lemmy.zip
            link
            fedilink
            English
            arrow-up
            3
            ·
            3 hours ago

            I would do a 400 (Bad Request). Then, with varying amounts of detail depending on the scale of the project and the framework capability, the response body would be something like: { “error”:true, “reason”: “validation”, “detail”: “user id should be numeric” }

          • tempest@lemmy.ca
            link
            fedilink
            arrow-up
            1
            ·
            3 hours ago

            Depends on the verb and the application. If the string is valid 200, if it isn’t 400, 404.

          • thesmokingman@programming.dev
            link
            fedilink
            arrow-up
            1
            ·
            3 hours ago

            It’s still just another type of ID so you can do lookups on it. Nothing would change. UUIDs are used all the time.

  • floo@retrolemmy.com
    link
    fedilink
    English
    arrow-up
    3
    ·
    6 hours ago

    Either way, the webpage didn’t load. And fuck literally everyone involved for not explaining to me what I need to do to fix it.

  • ryathal@sh.itjust.works
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    7 hours ago

    I’d rather see this than actual rest or the more popular use the bits of rest that are convenient.

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1.42K users / day
  • 4.54K users / week
  • 8.71K users / month
  • 20K users / 6 months
  • 1 local subscriber
  • 26.3K subscribers
  • 1.61K Posts
  • 40.1K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.5
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org