🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Error 426 when making GET request

    UIFlow
    2
    3
    2.6k
    Loading More Posts
    • 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.
    • E
      eddible
      last edited by

      Hey,
      I've just received a Core2 and wanted to try making some simple calls to an API. Problem is, I'm getting an error 426 back from the API I'm trying to access. It seems this error is saying my software is too old... I'm using UIFlow 1.7.2-core2 - is this too out of date? Is there a recommendation on what is best to run on my Core2 to get the latest version of MicroPython?

      thanks!

      ajb2k3A 1 Reply Last reply Reply Quote 0
      • ajb2k3A
        ajb2k3 @eddible
        last edited by

        @eddible Error 426 is a server response not an API response. It could be that the API calls have changed.

        UIFlow, so easy an adult can learn it!
        If I don't know it, be patient!
        I've ether not learned it or am too drunk to remember it!
        Author of the WIP UIFlow Handbook!
        M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

        1 Reply Last reply Reply Quote 0
        • E
          eddible
          last edited by

          Thanks for the reply. You’re right that it’s the server response. In urequests, HTTP/1.0 is hard coded which is why the server returns that error. The API calls haven’t changed, I can make the same requests without issue via other REST clients or using the standard Python requests module. The issue is with the way only HTTP/1.0 is supported.

          What I’m trying to understand is if there is a way to make a request using HTTP/1.1 or above so I can avoid this? I’ve tried just changing it to 1.1 in the urequests module but sadly it doesn’t appear to be that simple!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post