#API help
1 messages · Page 1 of 1 (latest)
Did you check the response from the query? It says every response includes the headers
It doesnt
** You are now Level 5! **
I have tried different api endpoints and none includes the header.
Wanna take a pic of the headers you get in response? Or paste them?
I get none
Could you show me an example?
How are you sending the request
For testing i paste an URL, then i use javascript and URL too
I can show you when i am not computer
Id really want to see the network tab in the Developer Tools of the browser.
For example this:
https://avatar.roblox.com/v1/users/(userId)/outfits
There is no header there
Yes sure as soon as i can i will send you that, thanks for trying to help
Aren't going to be any headers in the JSON response, that's just the body of the response
its nowhere
Refresh the page while the dev tools network tab is open
i found it its there, however i have multiple api endpoints and some get timed out, how do i make the code automatically check for each api endpoint?
Like check each Roblox endpoint to see every rate limit?
Each roblox endpoint i am using, yes
Because there are different categories that use different endpoints, some get http 429 after some time
I dont even know why this fetches only 200
Is there a reason you need to know every endpoint? what language are you using?
Surely you'd just detect what the rate limit is every request, and if you hit a 429 you'd wait some amount of time and try again
Not every endpoint
I use like 8 i think
And its connected to cors proxy since everyone said to me to use proxy when using roblox API
Html css java script
All in one html file small site
So why do you need to know all 8?
Just use the Promise from the fetch and wait extra if it returns a 429
You can grab the header from the response and store it so you know I guess
Because i thought different api endpoints have different limits or is it all the same?
They could be different but that's not what I'm saying
What is the goal of keeping track of the request limits? What do you plan to do with it?
Just set the timing so it doesnt give me 429 each time, but i get your idea, if 429 then wait and try again
But thats bit harder to code than the response headers
Well what do you do if the header is 0? Reject it? Or wait an amount of time?
Wait
Okay, so make a request. Take the header and store it. If the header says you have no more requests, wait an amount of time, then make the request again.
Yes, but how do i take the header info
If you're using the fetch API: https://developer.mozilla.org/en-US/docs/Web/API/Response/headers
Ohhh, ty this is very interesting, but also other problem that is there is user search friends list and user outfits only return few avatars not all, i get that friends api has hard limit of 200, but it still fetches max 182 and each time 2 fail
And now the user search only fetches 100
Wait i can give code
Look at the Roblox endpoint docs if they exist
Yes i found 200 is hard limit for friends, but for the other ones there is nothing that i was able to find anywhere
🤷♂️
So there has to be something in my code that does some damage, i have to admit i used AI for help, because its much more faster.
I was able to fetch 200 max users but even that for some reason changed to 100 now lol
Nothing in docs or anywhere
Check the network requests. Look at the headers and responses. I can't really help you with the specifics
tbh this is a scripting help channel, not so much a javascript help channel
Well using javascript is scripting no? Lua and Js are very similar
Spirit of the law versus word of law
Could you please just have fast look at the script? Its not long, very short
Lol not when I'm on my phone with no access to my home laptop
Besides, what's what you should be doing. Debugging and investigating. Checking documentation. Trying things out.
When will you get to your laptop if you want to say?
** You are now Level 6! **
it'd be tomorrow, but I'm not going to debug everything for you
that's a lot of time to try things and look at the network requests and try things out and google
Yeah i get it, thanks for the help i will try to figure it out