我在AWS弹性转码器上创建了一个管道,我正在尝试使用其API来创建工作.这就是我在做什么
Parse.Cloud.define("createJobOnElastic",function(request,response){ Parse.Cloud.httpRequest({ method: 'POST',headers: { 'Content-Type': 'application/json; charset=UTF-8','Accept': '*/*','Host': 'elastictranscoder.us-east-1.amazonaws.com:443','Content-Length': '300',"x-amz-date": new Date().getTime() },url: 'https://aws.elastictranscoder.us-east-1.amazonaws.com:443/2012-09-25/jobs',body:{ "Input":{ "Key":"fullViewLq1teqJ1Ym-nHGwcJtRuL-1433857991.895335.mp4","FrameRate":"auto","Resolution":"auto","AspectRatio":"auto","Interlaced":"auto","Container":"mp4" },"OutputKeyPrefix":"compressed/","Outputs":[ { "Key":"fullViewLq1teqJ1Ym-nHGwcJtRuL-1433857991.895335.mp4","Rotate":"0","PresetId":"1351620000001-000030" } ],"PipelineId":"xxxxxxxxx-xxxx" },success: function(httpResponse) { // console.log(httpResponse); alert("Worked TRANCODER"); response.success(); },error: function(httpResponse) { // console.error(httpResponse); alert("Did not work TRANSCODER"); response.error(httpResponse); } }); });
我可以看到我的url可能是错误的,但是这是因为我不能真正地告诉我应该从他们的文档发送请求到哪个url:http://docs.aws.amazon.com/elastictranscoder/latest/developerguide/create-job.html#create-job-description
这是我得到的回应:
{"uuid":"7dd5e323-167f-fe75-ca64-0adeeebad099","status":0,"headers":{"Connection":"keep-alive","Content-Language":"en","Content-Length":"3871","Content-Type":"text/html","Date":"Tue,09 Jun 2015 14:44:23 GMT","Mime-Version":"1.0","Server":"squid/3.1.19","vary":"Accept-Language","X-Squid-Error":"ERR_DNS_FAIL 0"},"text":"Request Failed; 56-111 Failure when receiving data from the peer; Connection refused","buffer":[],"cookies":{}}
关于如何做的任何反馈将是巨大的.
谢谢.
解决方法
原文地址:https://www.jb51.cc/js/152638.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。