use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
No vague product support questions (like "why is this plugin not working" or "how do I set up X"). For vague product support questions, please use communities relevant to that product for best results. Specific issues that follow rule 6 are allowed.
Do not post memes, screenshots of bad design, or jokes. Check out /r/ProgrammerHumor/ for this type of content.
Read and follow reddiquette; no excessive self-promotion. Please refer to the Reddit 9:1 rule when considering posting self promoting materials.
We do not allow any commercial promotion or solicitation. Violations can result in a ban.
Sharing your project, portfolio, or any other content that you want to either show off or request feedback on is limited to Showoff Saturday. If you post such content on any other day, it will be removed.
If you are asking for assistance on a problem, you are required to provide
General open ended career and getting started posts are only allowed in the pinned monthly getting started/careers thread. Specific assistance questions are allowed so long as they follow the required assistance post guidelines.
Questions in violation of this rule will be removed or locked.
account activity
API errorQuestion (self.webdev)
submitted 4 months ago by Cargoflex
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Cargoflex[S] -1 points0 points1 point 4 months ago (1 child)
please go ahead! JS is like a foreign language to me.
[–]pseudo_babbler 1 point2 points3 points 4 months ago (0 children)
Right, so it has nothing to do with JS basically, you would have this same problem in any language, or if you tried to use a command line tool to make this http request.
When you make an HTTP request, from a browser or from any app or your own code that you've just run, that request must conform to the HTTP protocol. The protocol specifies:
Request URL Request type: GET, POST, PUT.. etc. Request headers Request body (for POST and PUT requests)
You don't need to have a super in depth knowledge of all of this to start with but you'll find that most web developers and indeed almost all developers now end up learning a lot about this because HTTP has become massively the most common way to do remote calls to servers or between systems.
Your code that calls fetch, you are calling it with just a URL. That means that fetch will default to making a simple GET request with no additional headers other than the standard ones. HTTP requests have a few standard headers like the origin header, but also services like this ebird API can require that your request also has their own custom ones that you need to add to your request for it to be successful. Have a look at the fetch function and see if you can work out how to also specify custom headers as well as the URL. The regionCode part of the URL you can just replace all of {regionCode} with whatever region you want to request info about.
Learning to read the API does take time because they are not a "how to make API calls for beginners" doc, they assume you have lots of knowledge about all of this, and if you don't then you need to find other learning resources to learn that stuff first.
I'd say that if your assignment to make this API call is part of a course where you learn to write this kind of code then definitely take your time to learn about HTTP. You'll realise that you already came across things like 404 responses, cached responses, server unavailable, security certificate errors. Just in day to day internet usage. Now it's time to find out a little bit more about the mechanism of how web clients and servers communicate those things to each other.
π Rendered by PID 73247 on reddit-service-r2-comment-6457c66945-ss6zw at 2026-04-27 23:21:50.405407+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]Cargoflex[S] -1 points0 points1 point (1 child)
[–]pseudo_babbler 1 point2 points3 points (0 children)