Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.

Add an explanation about XHR #13

Merged
merged 3 commits into from
Oct 22, 2017
Merged

Add an explanation about XHR #13

merged 3 commits into from
Oct 22, 2017

Conversation

Hx66
Copy link

@Hx66 Hx66 commented Oct 21, 2017

Hi @mkruijt ,
I have added an explanation about XHR in the review of week 5.

Copy link
Member

@mkruijt mkruijt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi looks good, thank you so much! I just added some notes mostly language related. But nice short and clear explanation!

Week5/REVIEW.MD Outdated
## XMLHTtpRequest
**XMLHttpRequest** is an objects to interact with servers. You can retrieve data from a URL without having to do a full page refresh. XMLHttpRequest is used heavily in Ajax programming. - [MDN](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest)
## XMLHttpRequest
**XMLHttpRequest** is an objects to interact with servers. You can retrieve data from a URL without having to do a full page refresh. XMLHttpRequest is used heavily in Ajax programming - [MDN](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

object (without the s 😄 )

Week5/REVIEW.MD Outdated

So what is Ajax?
**Ajax** is a method of exchanging data with a server, and updating parts of a web page without reloading the entire page.

Let's diving a bit deeply into the code:
Let's diving into the code:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dive 😄

Week5/REVIEW.MD Outdated
* 1 : request has been set up.
* 2 : request has been sent.
* 3 : request is in process.
* 4 : request is complete.

In the code below we are checking if the request is complete or not, and we check the status == 200 just to make sure that we do not get 404 error. - Take a look about [HTTP Status Code](https://httpstatuses.com).
In the code below we are checking if the request is complete or not, and we check the status == 200 just to make sure that we do not get 404 error - Take a look about [HTTP Status Code](https://httpstatuses.com).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that we do not get a 404 error

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read more about it here: (instead of take a look about)

Week5/REVIEW.MD Outdated

First, we need to make an instance from 'XMLHttpRequest' class.
First, we need to make an instance from 'XMLHttpRequest' object.
```javascript
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can also just type "js", less typing 😄

@Hx66
Copy link
Author

Hx66 commented Oct 22, 2017

Hi @mkruijt ,
Thank you, I did some changes based upon your notes.

Copy link
Member

@mkruijt mkruijt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thank you!

@mkruijt mkruijt merged commit f532513 into HackYourFuture:master Oct 22, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants