HTTP 426 (Upgrade Required)

The error comes from this line,

local response = http:GetAsync(request)

(Nothing is from toolbox)

And the site seemed very trustworthy to me.

try to open your place in roblox studio do(ctrl+Shift+f) and delet any script that have required in it

image

Try printing the response headers. It should mention what protocol it expects. If GetAsync doesn’t return that then using RequestAsync should.

1 Like

can you try to search for welding?

image

RequestAsync(request) gives this error:

Unable to cast to Dictionary

well its not a virus, are you sure there is no viruses in the models or workspace?

try to desactivate http save the game and then activate it

1 Like

100% sure there are no items in the game that I am not aware of that are harmfull.

1 Like

I’m pretty sure that means the value you’re passing to RequestAsync isn’t a dictionary. What is it?

the problem must be from http request

It just returns JSON. I don’t know what else it should return…

It didn’t work. Still on the same error.

You said your error was unable to cast to dictionary which should mean you’re not passing a dictionary. If you are doing that correctly then try running JSONDecode before printing.

2 Likes

wait I am joining the game to try to see where is the problem

1 Like
	local request = ("https://newsapi.org/v2/everything?q=" .. search .. "&apiKey=" .. key 
.."&from=2020-11-10&sortBy=published")
local response = http:GetAsync(request)
local result = http:JSONDecode(response)

This is correct right?

According to Mozilla,

The HTTP 426 Upgrade Required client error response code indicates that the server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol. The server sends an Upgrade header with this response to indicate the required protocol(s).

Sounds like the client and server aren’t using the same version of the HTTP protocol?

This is for Firefox, but I presume Roblox would use similar error codes.
I’ll look into newsapi.

1 Like

It used to work till now, that is what confuses me. I think it is not my code, but roblox?

Someone might’ve upgraded something that broke your code.