O
onnodehaan
Guest
Hi Peter, This javascript example show how we would send data to it from postman for example. I'm wondering if i could mimic the same approach in OpenEdge? Regards, Onno var http = require("http"); var options = { "method": "POST", "hostname": [ "test", "test ], "path": [ "api", "v1", "attachments" ], "headers": { "content-type": "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW", "Cache-Control": "no-cache", "Postman-Token": "8631da63-55e3-43f0-bdb4-1fee2cfca911" } }; var req = http.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { var body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write("------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"attachment\"\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"attachment\"\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"); req.end();
Continue reading...
Continue reading...