jeromegn / DocumentUp

Pretty documentation generator for Github projects with proper Readme.
http://documentup.com
884 stars 90 forks source link

jQuery example doesn't work #112

Open resynth1943 opened 4 years ago

resynth1943 commented 4 years ago
$.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 commented 4 years ago

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

resynth1943 commented 4 years ago

You can go here to see it for yourself.

jeromegn commented 4 years ago

Huh, good catch.

This is deprecated. Should remove from the docs.

resynth1943 commented 4 years ago

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

jeromegn commented 4 years ago

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

resynth1943 commented 4 years ago

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