Skip to content
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

jQuery example doesn't work #112

Open
resynth1943 opened this issue Jul 1, 2020 · 6 comments
Open

jQuery example doesn't work #112

resynth1943 opened this issue Jul 1, 2020 · 6 comments
Labels

Comments

@resynth1943
Copy link

$.ajax({
  url: "https://documentup.com/compiled",
  dataType: "jsonp",
  data: {
    content: "# test",
    name: "Test JSONP!"
  },
  success: function(resp){
    // `status` is always provided
    if (resp.status == 200) {
      // Write to your document
      document.open();
      document.write(resp.html);
      document.close();
    }
  }
});

This actually generates a 404, for some odd reason. Not sure why, as this is a documented API in the README.

@resynth1943
Copy link
Author

resynth1943 commented Jul 1, 2020

This was actually discovered when I was trying to replace this example with something that uses the native fetch.

@resynth1943
Copy link
Author

@jeromegn jeromegn added the Chore label Jul 2, 2020
@jeromegn
Copy link
Owner

jeromegn commented Jul 2, 2020

Huh, good catch.

This is deprecated. Should remove from the docs.

@resynth1943
Copy link
Author

Deprecated? Fancy an MR that takes it out, then?

@jeromegn
Copy link
Owner

jeromegn commented Jul 2, 2020

Either that or we re-implement it :) I think it's maybe a helpful feature, but not in that form exactly.

@resynth1943
Copy link
Author

Haha, I'd love to modernise some of this with fetch and the new cool JS APIs :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants