Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. WTF - The latest version of RestSharp has a major breaking change

WTF - The latest version of RestSharp has a major breaking change

Scheduled Pinned Locked Moved The Lounge
asp-netcsharpdotnetcomjson
19 Posts 15 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Marc Clifton

    Version 12.0.3:

    public enum Method
    {
    GET,
    POST,
    PUT,
    DELETE,
    HEAD,
    OPTIONS,
    PATCH,
    MERGE,
    COPY
    }

    Version 13.0.1:

    public enum Method
    {
        Get,
        Post,
        Put,
        Delete,
        Head,
        Options,
        Patch,
        Merge,
        Copy,
        Search
    }
    

    Why would they do that? That breaks code everywhere! :mad:

    Latest Articles:
    ASP.NET Core Web API: Plugin Controllers and Services

    O Offline
    O Offline
    oofalladeez343
    wrote on last edited by
    #2

    WTF! I don't even code in RestSharp and I know that is f****ed up.:mad:

    O A 2 Replies Last reply
    0
    • M Marc Clifton

      Version 12.0.3:

      public enum Method
      {
      GET,
      POST,
      PUT,
      DELETE,
      HEAD,
      OPTIONS,
      PATCH,
      MERGE,
      COPY
      }

      Version 13.0.1:

      public enum Method
      {
          Get,
          Post,
          Put,
          Delete,
          Head,
          Options,
          Patch,
          Merge,
          Copy,
          Search
      }
      

      Why would they do that? That breaks code everywhere! :mad:

      Latest Articles:
      ASP.NET Core Web API: Plugin Controllers and Services

      R Offline
      R Offline
      Richard Deeming
      wrote on last edited by
      #3

      At least it was a major version bump. I've seen libraries make similar breaking changes in a minor version bump! :doh:


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      1 Reply Last reply
      0
      • O oofalladeez343

        WTF! I don't even code in RestSharp and I know that is f****ed up.:mad:

        O Offline
        O Offline
        oofalladeez343
        wrote on last edited by
        #4

        Thank God they don't do that for Java or Python... or HTML or C++/C#... or JavaScript or SQL... that would f*** up almost everyone...

        1 Reply Last reply
        0
        • M Marc Clifton

          Version 12.0.3:

          public enum Method
          {
          GET,
          POST,
          PUT,
          DELETE,
          HEAD,
          OPTIONS,
          PATCH,
          MERGE,
          COPY
          }

          Version 13.0.1:

          public enum Method
          {
              Get,
              Post,
              Put,
              Delete,
              Head,
              Options,
              Patch,
              Merge,
              Copy,
              Search
          }
          

          Why would they do that? That breaks code everywhere! :mad:

          Latest Articles:
          ASP.NET Core Web API: Plugin Controllers and Services

          0 Offline
          0 Offline
          0x01AA
          wrote on last edited by
          #5

          For me something like this goes under 'code format nazis' :(

          1 Reply Last reply
          0
          • M Marc Clifton

            Version 12.0.3:

            public enum Method
            {
            GET,
            POST,
            PUT,
            DELETE,
            HEAD,
            OPTIONS,
            PATCH,
            MERGE,
            COPY
            }

            Version 13.0.1:

            public enum Method
            {
                Get,
                Post,
                Put,
                Delete,
                Head,
                Options,
                Patch,
                Merge,
                Copy,
                Search
            }
            

            Why would they do that? That breaks code everywhere! :mad:

            Latest Articles:
            ASP.NET Core Web API: Plugin Controllers and Services

            D Offline
            D Offline
            Dan Neely
            wrote on last edited by
            #6

            The indenting in the first example is as broken as the capitalization changes in the second one.                                                                                             X| X| X| X| X|                         X| X| X| X| X| X|                             X| X| X| X| X| X| X| X| X|               X| X|                             X| X|                X| X| X| X| X| X| X| X| X| X| X| X|           X|                                                X|      X| X| X| X| X| X| X| X| X| X| X| X| X| X|      X|                                                     X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X|      X|               X|      X|                   X| X| X| X| X| X| X|       &n

            E 1 Reply Last reply
            0
            • M Marc Clifton

              Version 12.0.3:

              public enum Method
              {
              GET,
              POST,
              PUT,
              DELETE,
              HEAD,
              OPTIONS,
              PATCH,
              MERGE,
              COPY
              }

              Version 13.0.1:

              public enum Method
              {
                  Get,
                  Post,
                  Put,
                  Delete,
                  Head,
                  Options,
                  Patch,
                  Merge,
                  Copy,
                  Search
              }
              

              Why would they do that? That breaks code everywhere! :mad:

              Latest Articles:
              ASP.NET Core Web API: Plugin Controllers and Services

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #7

              As the new CIO, I would probably lie awake thinking on why this enum had to be shouting in the first place. I tend to do that with some of my code comments as I get older though. ATTENTION: ... (stringing HTML?)

              "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

              A 1 Reply Last reply
              0
              • M Marc Clifton

                Version 12.0.3:

                public enum Method
                {
                GET,
                POST,
                PUT,
                DELETE,
                HEAD,
                OPTIONS,
                PATCH,
                MERGE,
                COPY
                }

                Version 13.0.1:

                public enum Method
                {
                    Get,
                    Post,
                    Put,
                    Delete,
                    Head,
                    Options,
                    Patch,
                    Merge,
                    Copy,
                    Search
                }
                

                Why would they do that? That breaks code everywhere! :mad:

                Latest Articles:
                ASP.NET Core Web API: Plugin Controllers and Services

                S Offline
                S Offline
                Slacker007
                wrote on last edited by
                #8

                what RestSharp are you looking at? the current nuget package is version 107.0.3 and I don't see this major breaking change anywhere in their github issues log. perhaps I am missing something. at 111.9M downloads, I would think we would see more chatter online for this. NuGet Gallery | RestSharp 107.0.3[^]

                1 Reply Last reply
                0
                • M Marc Clifton

                  Version 12.0.3:

                  public enum Method
                  {
                  GET,
                  POST,
                  PUT,
                  DELETE,
                  HEAD,
                  OPTIONS,
                  PATCH,
                  MERGE,
                  COPY
                  }

                  Version 13.0.1:

                  public enum Method
                  {
                      Get,
                      Post,
                      Put,
                      Delete,
                      Head,
                      Options,
                      Patch,
                      Merge,
                      Copy,
                      Search
                  }
                  

                  Why would they do that? That breaks code everywhere! :mad:

                  Latest Articles:
                  ASP.NET Core Web API: Plugin Controllers and Services

                  pkfoxP Offline
                  pkfoxP Offline
                  pkfox
                  wrote on last edited by
                  #9

                  That bit me too Marc

                  "Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP

                  1 Reply Last reply
                  0
                  • D Dan Neely

                    The indenting in the first example is as broken as the capitalization changes in the second one.                                                                                             X| X| X| X| X|                         X| X| X| X| X| X|                             X| X| X| X| X| X| X| X| X|               X| X|                             X| X|                X| X| X| X| X| X| X| X| X| X| X| X|           X|                                                X|      X| X| X| X| X| X| X| X| X| X| X| X| X| X|      X|                                                     X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X|      X|               X|      X|                   X| X| X| X| X| X| X|       &n

                    E Offline
                    E Offline
                    englebart
                    wrote on last edited by
                    #10

                    I feel like I am trapped in the Centipede arcade game.

                    1 Reply Last reply
                    0
                    • O oofalladeez343

                      WTF! I don't even code in RestSharp and I know that is f****ed up.:mad:

                      A Offline
                      A Offline
                      Andreas Mertens
                      wrote on last edited by
                      #11

                      Exactly, who the heck put that Search item in there 😁

                      1 Reply Last reply
                      0
                      • L Lost User

                        As the new CIO, I would probably lie awake thinking on why this enum had to be shouting in the first place. I tend to do that with some of my code comments as I get older though. ATTENTION: ... (stringing HTML?)

                        "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

                        A Offline
                        A Offline
                        Andreas Mertens
                        wrote on last edited by
                        #12

                        Someone probably got a warning/hint in VS that the naming didn't meet standards, and thought to correct it....

                        1 Reply Last reply
                        0
                        • M Marc Clifton

                          Version 12.0.3:

                          public enum Method
                          {
                          GET,
                          POST,
                          PUT,
                          DELETE,
                          HEAD,
                          OPTIONS,
                          PATCH,
                          MERGE,
                          COPY
                          }

                          Version 13.0.1:

                          public enum Method
                          {
                              Get,
                              Post,
                              Put,
                              Delete,
                              Head,
                              Options,
                              Patch,
                              Merge,
                              Copy,
                              Search
                          }
                          

                          Why would they do that? That breaks code everywhere! :mad:

                          Latest Articles:
                          ASP.NET Core Web API: Plugin Controllers and Services

                          O Offline
                          O Offline
                          obermd
                          wrote on last edited by
                          #13

                          If adding an Enum entry (Search) breaks your code, you have serious problems. I'd be more concerned about the shift from all CAPS to Proper case - too many languages are case sensitive.

                          Z 1 Reply Last reply
                          0
                          • O obermd

                            If adding an Enum entry (Search) breaks your code, you have serious problems. I'd be more concerned about the shift from all CAPS to Proper case - too many languages are case sensitive.

                            Z Offline
                            Z Offline
                            zpinklb
                            wrote on last edited by
                            #14

                            ALLCAPS, I think is the standard in RestAPIs, when using Postman to test my own code, it's all CAPS there.

                            D 1 Reply Last reply
                            0
                            • M Marc Clifton

                              Version 12.0.3:

                              public enum Method
                              {
                              GET,
                              POST,
                              PUT,
                              DELETE,
                              HEAD,
                              OPTIONS,
                              PATCH,
                              MERGE,
                              COPY
                              }

                              Version 13.0.1:

                              public enum Method
                              {
                                  Get,
                                  Post,
                                  Put,
                                  Delete,
                                  Head,
                                  Options,
                                  Patch,
                                  Merge,
                                  Copy,
                                  Search
                              }
                              

                              Why would they do that? That breaks code everywhere! :mad:

                              Latest Articles:
                              ASP.NET Core Web API: Plugin Controllers and Services

                              D Offline
                              D Offline
                              Davyd McColl
                              wrote on last edited by
                              #15

                              It's a major version bump, so if they were looking to change their casing, this is the _exactly_ right time to do it. You should be able to fix up without too much trouble - either automated find-and-replace (followed by a build to test) or just human find-and-replace shouldn't take that long unless you literally have thousands of REST requests in your project. The newer naming is consistent with System.Net.Http.HttpMethod values (and overall accepted C# naming conventions)

                              ------------------------------------------------ If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

                              1 Reply Last reply
                              0
                              • Z zpinklb

                                ALLCAPS, I think is the standard in RestAPIs, when using Postman to test my own code, it's all CAPS there.

                                D Offline
                                D Offline
                                Davyd McColl
                                wrote on last edited by
                                #16

                                For the values, sure, but that's not the standard when coding enum values. FWIW, I think this is a good change, putting RestSharp in consistent line with other libaries (including System.Net) and making the change in a major version bump is _exactly_ the right place to do it.

                                ------------------------------------------------ If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

                                1 Reply Last reply
                                0
                                • M Marc Clifton

                                  Version 12.0.3:

                                  public enum Method
                                  {
                                  GET,
                                  POST,
                                  PUT,
                                  DELETE,
                                  HEAD,
                                  OPTIONS,
                                  PATCH,
                                  MERGE,
                                  COPY
                                  }

                                  Version 13.0.1:

                                  public enum Method
                                  {
                                      Get,
                                      Post,
                                      Put,
                                      Delete,
                                      Head,
                                      Options,
                                      Patch,
                                      Merge,
                                      Copy,
                                      Search
                                  }
                                  

                                  Why would they do that? That breaks code everywhere! :mad:

                                  Latest Articles:
                                  ASP.NET Core Web API: Plugin Controllers and Services

                                  R Offline
                                  R Offline
                                  RafagaX
                                  wrote on last edited by
                                  #17

                                  Not in Visual Basic... (Run away laughing maniacally) :laugh:

                                  "Science fiction is any idea that occurs in the head and doesn’t exist yet, but soon will, and will change everything for everybody, and nothing will ever be the same again." Ray Bradbury

                                  1 Reply Last reply
                                  0
                                  • M Marc Clifton

                                    Version 12.0.3:

                                    public enum Method
                                    {
                                    GET,
                                    POST,
                                    PUT,
                                    DELETE,
                                    HEAD,
                                    OPTIONS,
                                    PATCH,
                                    MERGE,
                                    COPY
                                    }

                                    Version 13.0.1:

                                    public enum Method
                                    {
                                        Get,
                                        Post,
                                        Put,
                                        Delete,
                                        Head,
                                        Options,
                                        Patch,
                                        Merge,
                                        Copy,
                                        Search
                                    }
                                    

                                    Why would they do that? That breaks code everywhere! :mad:

                                    Latest Articles:
                                    ASP.NET Core Web API: Plugin Controllers and Services

                                    J Offline
                                    J Offline
                                    JustDre
                                    wrote on last edited by
                                    #18

                                    Not fun, but it could be fixed pretty easily with a regex search and replace.

                                    1 Reply Last reply
                                    0
                                    • M Marc Clifton

                                      Version 12.0.3:

                                      public enum Method
                                      {
                                      GET,
                                      POST,
                                      PUT,
                                      DELETE,
                                      HEAD,
                                      OPTIONS,
                                      PATCH,
                                      MERGE,
                                      COPY
                                      }

                                      Version 13.0.1:

                                      public enum Method
                                      {
                                          Get,
                                          Post,
                                          Put,
                                          Delete,
                                          Head,
                                          Options,
                                          Patch,
                                          Merge,
                                          Copy,
                                          Search
                                      }
                                      

                                      Why would they do that? That breaks code everywhere! :mad:

                                      Latest Articles:
                                      ASP.NET Core Web API: Plugin Controllers and Services

                                      pkfoxP Offline
                                      pkfoxP Offline
                                      pkfox
                                      wrote on last edited by
                                      #19

                                      That bit me too Marc

                                      "Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP

                                      1 Reply Last reply
                                      0
                                      Reply
                                      • Reply as topic
                                      Log in to reply
                                      • Oldest to Newest
                                      • Newest to Oldest
                                      • Most Votes


                                      • Login

                                      • Don't have an account? Register

                                      • Login or register to search.
                                      • First post
                                        Last post
                                      0
                                      • Categories
                                      • Recent
                                      • Tags
                                      • Popular
                                      • World
                                      • Users
                                      • Groups