This forum is now read-only. Please use our new forums at discuss.codecademy.com.

How to use APIs with JavaScript Forum

View Course » View Exercise

144 points
D0390c6a05fd945ee3afa298663d2257?s=140&d=retro
Submitted by
mtfricode
about 3 years ago

API requests for JSON data.

When making an actual API call (instead of pulling JSON from a variable in the local script like in the exercise) do we need to specify a Content-Type for the header of the request, like 'text/json' or some such similar to how one would for XML data? I have been struggling with APIs for 2 years now, and I have never come across such an easily understandable explanation of them as offered here. Thank you so much!


0 votes

permalink

how do u do 15/19??!!

83 points
12fcb3b8410e9a7ffcadcd02fb0a5072?s=140&d=retro
Submitted by
12maconcon
over 2 years ago