🤖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

    Scheduled Pinned Locked Moved UIFlow
    3 Posts 2 Posters 3.1k Views 1 Watching
    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 Offline
      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 Offline
        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 Offline
          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

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post