Skip to content

Commit 41e028f

Browse files
committed
Section 17: XMLHttpRequest pt1
1 parent e2c5db3 commit 41e028f

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

17-Making-HTTP-Requests/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,22 @@ Every key in JSON must be a string with quotes. We also can use arrays, We can h
110110
- SWAPI API a Star Wars API that we can play around with `https://swapi.co`.
111111

112112
- JSON Formatter & validator `https://jsonformatter.curiousconcept.com`.
113+
114+
create an international phonetic alphabet with examples
115+
116+
## 2. XMLHttpRequest
117+
118+
- The "original" way of sending requests via JS.
119+
- Does not support promises, so...lots of callbacks!
120+
- WTF is going on with the weird capitalization?
121+
- Clunky syntax that i find difficult to remember!
122+
123+
Making our first request using XMLHttpRequest through JavaScript. So these are objects in the browser we can create that have different methods and we can use them to fetch data from an API to send data somewhere.
124+
125+
So we end up with a lot of callbacks, if we have nested requests, things where we want to make one request, get information back and then make a second request.
126+
127+
This was the only way of making a request **XMLHttpRequest**
128+
129+
```javascript
130+
const myReq = new XMLHttpRequest()
131+
```

0 commit comments

Comments
 (0)