I am trying to get my json using jsonp
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script type="text/javascript">
$.ajax({
url: 'https://192.168.236.33/confbridge_participants/conference_participants.json?cid=0090000007',
type: "GET",
dataType: "jsonp",
jsonpCallback: 'callback',
contentType: "application/javascript",
success: function(data) {
console.log(data);
}
});
</script>
and i always get this error
Refused to execute script from 'https://192.168.236.33/confbridge_participants/conference_participants.json?cid=0090000007&callback=callback&_=1439798517979' because its MIME type ('application/json') is not executable, and strict MIME type checking is enabled.
here where do i get my json on my rails controller
def conference_participants
conditions = Hash.new
if params[:cid]
conditions[:cid] = params[:cid]
end
@conference_participant = ConfbridgeParticipant.where(conditions)
respond_to do |format|
format.html { render :html => @conference_participant }
format.text { render :text => @conference_participant.pluck(:id).first }
format.json { render :json => @conference_participant}
format.js { render :json => @conference_participant , :callback => params[:callback]}
end
end
thanks :)