Hi,
Trying to fetch EP information by Ajax call on my upcoming webpage, but get error. I've tried with and without Authorization with no success.
Approach 1:
$.ajax({
url: 'http://ops.epo.org/3.1/rest-services/pu ... 325/biblio',
type: 'GET',
dataType: 'json',
success: function() { alert('hello!'); },
error: function() { alert('boo!'); },
beforeSend: setHeader
});
function setHeader(xhr) {
xhr.setRequestHeader('Authorization', 'Bearer xxxx');
xhr.setRequestHeader('X-Target-URI', 'http://ops.epo.org');
xhr.setRequestHeader('Accept', 'application/json');
}
Approach 2:
$.getJSON("http://ops.epo.org/3.1/rest-services/pu ... 325/biblio", function (data)
{
if (data.length > 0) {
alert("YES");
} else {
alert("no");
}
Response output:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<fault xmlns="http://ops.epo.org">
<code>SERVER.Forbidden</code>
<message>An unknown error occurred. Please contact Open Patent Services Team (open-patent-services-and-publication-se ... )</message>
</fault>
Perhaps you know my misstake or the root cause?
Best regards,
Albin
HTTP 500 error when calling the API with Ajax
-
- Posts: 1298
- Joined: Thu Feb 22, 2007 5:32 pm
Re: HTTP 500 error when calling the API with Ajax
Hi,
Did you already had a look at our document: http://documents.epo.org/projects/babyl ... 1_0_en.pdf?
Regards,
OPS support
Did you already had a look at our document: http://documents.epo.org/projects/babyl ... 1_0_en.pdf?
Regards,
OPS support
-
- Posts: 4
- Joined: Fri Mar 04, 2016 12:51 am
Re: HTTP 500 error when calling the API with Ajax
Hello,
Do you get a 500 when you make the request using the Developers console? https://developers.epo.org/
Do you get a 500 when you make the request using the Developers console? https://developers.epo.org/