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

928 points
Picture
Submitted by
Amin Brodie
over 4 years ago

Please help....Anatomy of a Request????

Ok, i understand the syntax for writing an HTTP reques but whats with this. No explanation was given for what this code is refering to. Is this supposed to explain what the server sees?:

// POST /codecademy/learn-http HTTP/1.1
// Host: www.codecademy.com
// Content-Type: text/html; charset=UTF-8

// Name=Eric&Age=26


3 votes

permalink

This lesson (The Request) is missing the excellent explanations that Eric usually provides. I am just regurgitating code, not really understanding what is going on. Eric I know your a volunteer so if you have time, please do a line by line explanation of what each line does and how the server reacts.

381 points
513ac1e2a6ebb69df1001614_413434774
Submitted by
N8 S
about 4 years ago


0 votes

permalink

i went to mozilla developer network to read more about XMLHttpRequest(), .open() async: true of false, etc. as there is no explanation whatsoever in this exercise.

it gets complicated cause there are like a lot of communication protocols going on that are not easy to grasp i think, so I guess he decided not to hone in on that as it would take a considerable amount of time to grasp it all.

1715 points
50292f7244db2d00020166c6_484768602
Submitted by
Jorge Davalos
over 3 years ago


-2 votes

permalink

Copy My Code
// POST /codecademy/learn-http HTTP/1.1
// Host: www.codecademy.com
// Content-Type: text/html; charset=UTF-8

// Name=Eric&Age=26

522 points
5698727d4a69252ec8000529_67468782
Submitted by
Adrian Simon
about 3 years ago

1 Comment

66fb94538ae0d01afec821c1783cb852?s=140&d=retro d0mme over 2 years ago

What the heck teaches me this chapter? To comment requests out or what?


-5 votes

permalink

It's still getting us used to the HTTP request syntax. But not knowing much about API's and there workings I can't say for sure.

2094 points
6756c9a7797cbf7affe79126da187df0?s=140&d=retro
Submitted by
mckinsey2
over 4 years ago