We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4e0fd17 + 5ced803 commit 7b05266Copy full SHA for 7b05266
snippets/functions/api-functions/api_callExternalAPI.js
@@ -0,0 +1,9 @@
1
+exports = async function(arg){
2
+ const url = "https://api.stackexchange.com/2.3/answers?key=U4DMV*8nvpm3EOpvf69Rxw((&site=stackoverflow&page=1&pagesize=10&order=desc&sort=activity&filter=default";
3
+
4
+ const response = await context.http.get({ url: url })
5
+ // The response body is a BSON.Binary object, so parse it:
6
+ const result = EJSON.parse(response.body.text())
7
+ // console.log(JSON.stringify(result));
8
+ return result;
9
+}
0 commit comments