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条回答 默认 最新

报告相同问题?

悬赏问题

  • ¥30 关于用python写支付宝扫码付异步通知收不到的问题
  • ¥50 vue组件中无法正确接收并处理axios请求
  • ¥15 隐藏系统界面pdf的打印、下载按钮
  • ¥15 MATLAB联合adams仿真卡死如何解决(代码模型无问题)
  • ¥15 基于pso参数优化的LightGBM分类模型
  • ¥15 安装Paddleocr时报错无法解决
  • ¥15 python中transformers可以正常下载,但是没有办法使用pipeline
  • ¥50 分布式追踪trace异常问题
  • ¥15 人在外地出差,速帮一点点
  • ¥15 如何使用canvas在图片上进行如下的标注,以下代码不起作用,如何修改