dsa111111 2014-11-17 09:15
浏览 49
已采纳

对API的POST请求

So some quick background: I'm trying to teach myself to code, but right now I'm really a beginner. I'm trying to help out my younger brother's school with setting up a moodle-powered online course system featuring videos of full classes, and I've run into a snag with the school's preferred video host.

Basically, here's my problem: The guys hosting the videos don't want to allow people to directly link to the videos, instead they built an API they want us to use that takes a POST request, then outputs a new URL, which expires after one use.

I've figured out how to use the API using POSTman or in the terminal

#for example: 
#  curl -F 
#     api_key='the api key they gave us' -F  
#     email='a user's email' -F  
#     destination='a subdirectory' 
#     'the target URL'

What I can't figure out, is how to automate this process so that teachers can input the link to their video on our host's site ('somesite.com/videos/teacherx/') directly in the moodle class editor (if possible), so that whenever a student is taking the class they can click a link that runs the script, does the POST request, and redirects them to the new temporary URL.

In case you can't tell, I have no idea what I'm doing.

Thanks in advance

  • 写回答

1条回答 默认 最新

报告相同问题?

悬赏问题

  • ¥15 matlab实现基于主成分变换的图像融合。
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制
  • ¥20 usb设备兼容性问题
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊