The error comes from this line,
local response = http:GetAsync(request)
(Nothing is from toolbox)
And the site seemed very trustworthy to me.
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
Try printing the response headers. It should mention what protocol it expects. If GetAsync doesnât return that then using RequestAsync should.
can you try to search for welding?
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
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.
wait I am joining the game to try to see where is the problem
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.
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.