TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
parthasarathy B
NA
927
108.3k
Cross-Origin Read Blocking (CORB) blocked cross-origin
Oct 24 2018 2:04 AM
Hi all,
I am calling external webservice in sharepoint office 365 using ajax call. I am using the following code to acces the external webservice.But i am getting the following error.
"Cross-Origin Read Blocking (CORB) blocked cross-origin response with MIME type application/json"
. Any help would be helpful.Thanks in advance.
<script src=
"https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"
type=
"text/javascript"
></script>
<script type=
"text/javascript"
>
$(function () {
debugger;
try
{
$.ajax({
url:
"https://api.printful.com/countries"
,
headers: {
'Access-Control-Allow-Credentials'
:
true
,
'Access-Control-Allow-Origin'
:
'*'
,
'Access-Control-Allow-Methods'
:
'GET'
,
'Access-Control-Allow-Headers'
:
'application/json'
,
},
type:
"GET"
,
crossDomain:
true
,
dataType:
"jsonp"
,
jsonp:
'jsonp-callback'
,
async:
false
,
success: function (data) {
debugger;
console.log(
"count= "
+ data.d.results.length);
if
(data.d.results.length>0){
alert(
"Results Count:"
+data.d.results.length);
}
else
{
alert(
"no data"
);
}
},
error: function (data) {
console.log(
"Error"
);
console.log(data);
}
});
}
catch
(e)
{
console.log(e);
}
});
</script>
Reply
Answers (
1
)
How to get Power Shell Output into excel file
SharePoint 2013 questions