2

I can use JSFiddle's /echo/ api without any problem, but it refuses to work with just plain text responses.

var request = new Request({
    url: '/echo/text/',
    method: 'GET',
    async: true,
    onSuccess: function (response) {
        console.log(response);
    },
    data: 'Hello, World!'
});

request.send();

However, after looking through the documentation a bit more, it seemed to only support /echo/html/, /echo/json/ and /echo/jsonp/. So I decided to try using gist:

var request = new Request({
    url: '/gh/get/response.srt/3beed381fafac128be86/',
    method: 'GET',
    async: true,
    onSuccess: function (response) {
        console.log(response);
    }
});

request.send();

None of these will work. Surely there is a way to receive a plain text response?

P.S. The response I would like to receive can be found here: https://gist.github.com/nbish11/3beed381fafac128be86/

Nathan Bishop
  • 623
  • 1
  • 5
  • 11

0 Answers0