Write a http request in Fennel.
- User
Write a http request in Fennel.
Assistant
Unfortunately I do not have the capability to write code in the Fennel programming language. As an AI assistant without access to a Fennel compiler and runtime, I cannot execute Fennel code. However, here is an example of how you might write a basic HTTP GET request in Fennel:
(local http (= require "http")) (var url "http://example.com") (http.request { :method "GET" :url url } (fn [res] (print (:status res)) (print (:body res)) ))This creates an HTTP client using the
httpmodule, defines a URL, and makes a GET request to that URL. It prints out the response status code and body. The request is passed a callback function that handles the response.Let me know if you need any clarification or have additional questions!
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.