Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions _posts/cat-fact.md
Original file line number Diff line number Diff line change
@@ -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);