New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace jQuery with fetch in examples #53

Closed
typicode opened this Issue Nov 6, 2017 · 7 comments

Comments

Projects
None yet
2 participants
@typicode
Owner

typicode commented Nov 6, 2017

Todo

Currently, examples use jQuery. Since modern browsers now support fetch, it would be great to have updated examples :)

  • Update examples in README
  • Update index.html
  • Add fetch polyfill from unpkg in index.html

@typicode typicode changed the title from Replace examples with fetch to Replace jQuery with fetch in examples Nov 6, 2017

@vivek12345

This comment has been minimized.

Show comment
Hide comment
@vivek12345

vivek12345 Nov 6, 2017

Contributor

@typicode can I take this up?

Contributor

vivek12345 commented Nov 6, 2017

@typicode can I take this up?

@typicode

This comment has been minimized.

Show comment
Hide comment
@typicode

typicode Nov 6, 2017

Owner

Sure! Thank you

Owner

typicode commented Nov 6, 2017

Sure! Thank you

@vivek12345

This comment has been minimized.

Show comment
Hide comment
@vivek12345

vivek12345 Nov 6, 2017

Contributor

@typicode All your post end points are giving me a 301, leading to get calls.

$.ajax('http://jsonplaceholder.typicode.com/posts', {
  method: 'POST',
  data: {
    title: 'foo',
    body: 'bar',
    userId: 1
  }
}).then(function(data) {
  console.log(data);
});

This code itself is giving that issue.

Contributor

vivek12345 commented Nov 6, 2017

@typicode All your post end points are giving me a 301, leading to get calls.

$.ajax('http://jsonplaceholder.typicode.com/posts', {
  method: 'POST',
  data: {
    title: 'foo',
    body: 'bar',
    userId: 1
  }
}).then(function(data) {
  console.log(data);
});

This code itself is giving that issue.

@typicode

This comment has been minimized.

Show comment
Hide comment
@typicode

typicode Nov 6, 2017

Owner

I've added a redirection from http to https.
So GET request should be made to https://jsonplaceholder.typicode.com/posts

Owner

typicode commented Nov 6, 2017

I've added a redirection from http to https.
So GET request should be made to https://jsonplaceholder.typicode.com/posts

@vivek12345

This comment has been minimized.

Show comment
Hide comment
@vivek12345

vivek12345 Nov 6, 2017

Contributor

@typicode So should I replace all my POST and get url's with https ones.

Contributor

vivek12345 commented Nov 6, 2017

@typicode So should I replace all my POST and get url's with https ones.

@vivek12345

This comment has been minimized.

Show comment
Hide comment
@vivek12345

vivek12345 Nov 6, 2017

Contributor

@typicode I have updated the url's and have sent a PR for the same as well.
PR#54

Contributor

vivek12345 commented Nov 6, 2017

@typicode I have updated the url's and have sent a PR for the same as well.
PR#54

@typicode

This comment has been minimized.

Show comment
Hide comment
@typicode

typicode Nov 8, 2017

Owner

Merged, thanks again

Owner

typicode commented Nov 8, 2017

Merged, thanks again

@typicode typicode closed this Nov 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment