From 093a450b505f5dbf111d0a9f8ca32a7aabc6f466 Mon Sep 17 00:00:00 2001 From: Junaid Ansari <165090489+sophon314@users.noreply.github.com> Date: Mon, 15 Apr 2024 00:45:16 +0100 Subject: [PATCH] Create cat-fact.md --- _posts/cat-fact.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 _posts/cat-fact.md diff --git a/_posts/cat-fact.md b/_posts/cat-fact.md new file mode 100644 index 0000000..c4e57fb --- /dev/null +++ b/_posts/cat-fact.md @@ -0,0 +1,18 @@ +--- +title: "Learn a new cat fact" +summary: "This Function returns a random fact about cats from catfact.ninja" +date: "2024-04-15" +author: + name: Junaid + link: https://github.com/sophon314 +--- +// Set the URL +const config = { + url: "https://catfact.ninja/fact", +}; + +//Get the response +const response = await Functions.makeHttpRequest(config); + +// Send the repsonse upstairs +return Functions.encodeString(response.data.fact);