Last Updated: March 02, 2016
· fr0gs

Wrap HTTP content into HTTPS in Ajax request from Codepen

When trying to access mixed content with ajax in codepen, say:

function call_api_chuck () {
      url: "",
      jsonp: "callback",
      type: "GET",
      dataType: "jsonp",
      success: function (data) {
      xhrFields: {
    withCredentials: false

And you have other resources in your pen accessed via HTTPS, you get a Mixed-Content error.
Simply add before your url and it will be successfully wrapped.

url: ""