Ajax jQuery 401 unauthorised

I’m working with Wowza streaming platform. I would like to use Wowza API recording API. It works well when I type in web browser.
I’m using this link in my Web browser


However, when I used in AJAX called, the prompt pop out which I don’t want that to happen.

    async : false,
    url : "myurl.com:8086/livestreamrecord?app=live&streamname=myStream&action=startRecording",
    type : 'GET',
    dataType: "jsonp",
    beforeSend: function (xhr) {
        xhr.setRequestHeader('Authorization', "Any " + btoa(user+":"+password));


Though username:password@ append in the link in url ajax wouldn’t work for me. It produced 401 unauthorised error. I don’t want something that prompt out ask for authentication informations but straight direct authorisation without user knowledge.

Source: jquery

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.