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);