나는이 오류를 얻고있다. 프리 플라이트에 대한 응답이이 httpget 호출을 시도 할 때 잘못된 HTTP 상태 코드 405를 가지고 있습니다.응답 유효하지 않은 HTTP 상태 코드 405 AngularJS와
$http({
method: 'GET',
dataType: "json",
url: 'http://apidev.facu.la/api/json/infotag/search/?criteria=&infotagType=book&companyid=2',
headers: {
"Content-Type": "application/json"
}
}).then(function successCallback(response) {
alert('ok');
}, function errorCallback(response) {
alert('error');
console.log(response);
});
나는 무엇이 결여되어 있습니까? 우편 배달부 통화는 정상적으로 작동합니다. 감사
UPDATE
:엔드 포인트 코드 :
[WebInvoke(Method = "GET",
RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.Bare,
UriTemplate = "/json/infotag/search/?criteria={criteria}&infotagType={infotagType}&companyid={companyid}")]
public XElement InfoTagSearchXML_json(string criteria, string infotagType, int companyid)
{
return InfoTagSearchXML(criteria, infotagType, companyid);
}
방법은 허용되지 않습니다 (상태 코드 405) 끝점에 OPTIONS 메서드가 정의되어 있지 않다는 의미입니다. CORS 요청에는 필수 항목입니다. [CORS] (https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) 참조 끝점에 대한 세부 정보를 제공 할 수 있습니까? (언어, 프레임 워크 등) – KRONWALLED
@Kronwalled가 질문 본문에 전화를 추가했습니다. 나를 도와 준 Thx! – Laziale