입니다
public function runParseCloudFunction(cloudFunctionName:String):void
{
if (parseRequestor != null){
return;
}
//Create the HTTP request object
var request:URLRequest = new URLRequest("https://api.parse.com/1/functions/" + cloudFunctionName);
request.method = URLRequestMethod.POST;
// Create Parse headers
var headerAppID:URLRequestHeader = new URLRequestHeader("X-Parse-Application-Id", MY_PARSE_APP_ID);
var headerRestKey:URLRequestHeader = new URLRequestHeader("X-Parse-REST-API-Key", MY_PARSE_REST_KEY);
var headerContentType:URLRequestHeader = new URLRequestHeader("Content-Type", "application/json");
request.requestHeaders.push(headerAppID);
request.requestHeaders.push(headerRestKey);
request.requestHeaders.push(headerContentType);
//Add the URL variables, json encoded format (OPTIONAL)
request.data = '{"param1":"sample1","param2":"sample2","param3":"sample3"}';
//Initiate the transaction
parseRequestor = new URLLoader();
//requestor.dataFormat = URLLoaderDataFormat.TEXT;
parseRequestor.addEventListener(Event.COMPLETE, callParseCloudFunctionCompleted);
parseRequestor.addEventListener(IOErrorEvent.IO_ERROR, callParseCloudFunctionError);
parseRequestor.addEventListener(SecurityErrorEvent.SECURITY_ERROR, callParseCloudFunctionError);
parseRequestor.addEventListener(HTTPStatusEvent.HTTP_STATUS, callParseStatusHandler);
parseRequestor.load(request);
}
클라우드 구문 분석 API 버전 과 테스트 1.3.2
희망이 있습니다!
이것은 제 3 자 API https://github.com/parkerkrhoyt/Parse에 대한 링크입니다. 아래로 스크롤하면 "Flash Player에서 HTTP 인증 헤더를 수정할 수 없으므로 라이브러리는 AIR 만 사용하므로 데스크톱과 모바일 애플리케이션 모두에서 테스트했습니다. " – Phil
그렇다면 Flash Player에서 PHP API를 사용하는 것이 좋습니다. – Phil
표준 구성 요소가 아닌 플래시를 사용하여 인증 헤더를 수행 할 수 있습니다. 필,이 일을하는 수업이 필요한 경우, 내가 쓴 이메일을 보내 드리겠습니다. 커스텀 헤더, 전체 안심할 수있는 put, 삭제 등 –