Ask coding questions

← Back to all posts
status code 503 http request to amazon (works on local machine)
dade0000

On my machine i get the 200 status code, i guess the problem is the environment replit runs in, but i can't figure out a solution.

Voters
dade0000
Comments
hotnewtop
SixBeeps

Does that exact user agent work for you locally? From what it looks like that's the only thing I see wrong here.

dade0000

@SixBeeps yes it does work. I also tried with others User Agents, but it's the same thing: 200 on my machine, 503 here.

dade0000

@SixBeeps I run the code and got a random 200 status code, so I built a while loop to confirm this and it actually works. Due to this i tried to increase the timeout, but it doesn't seem to be it. I guess i'll just use discount while loop for now, but now i'm so curious about why this shit happens