
// send a post requestimport http from "pts/http";const makefile = open("Makefile");export const options = {};export default function main() {let response;response = http.post("https://httpbin.org/post", makefile, {headers: {"Content-Type": "application/octet-stream",},});}
export default function main() {let data = open('Makefile');console.log(data); // SHELL := /bin/bash ...data = open('Makefile', 'b');console.log(data); // [object ArrayBuffer]}
文档反馈