aboutsummaryrefslogtreecommitdiff
path: root/examples/http/http.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-11-24 16:36:27 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-11-24 16:36:27 -0500
commitd4b10514fbe3afc7229efe74b015a664b52eba33 (patch)
tree133cf2fd377ab8acbfa65908d04473ce0dd0ca49 /examples/http/http.tm
parent1e3fb8a2c0cca385d65c52679411b118b5fb4641 (diff)
Clean up some more null->none renames and fix the documentation. Also
change the literal syntax to `NONE:T` instead of `!T`
Diffstat (limited to 'examples/http/http.tm')
-rw-r--r--examples/http/http.tm4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/http/http.tm b/examples/http/http.tm
index f64a5048..f36fac60 100644
--- a/examples/http/http.tm
+++ b/examples/http/http.tm
@@ -78,7 +78,7 @@ func _send(method:_Method, url:Text, data:Text?, headers=[:Text] -> HTTPResponse
return HTTPResponse(Int(code), "":join(chunks))
func get(url:Text, headers=[:Text] -> HTTPResponse):
- return _send(GET, url, !Text, headers)
+ return _send(GET, url, NONE, headers)
func post(url:Text, data="", headers=["Content-Type: application/json", "Accept: application/json"] -> HTTPResponse):
return _send(POST, url, data, headers)
@@ -89,7 +89,7 @@ func put(url:Text, data="", headers=["Content-Type: application/json", "Accept:
func patch(url:Text, data="", headers=["Content-Type: application/json", "Accept: application/json"] -> HTTPResponse):
return _send(PATCH, url, data, headers)
-func delete(url:Text, data=!Text, headers=["Content-Type: application/json", "Accept: application/json"] -> HTTPResponse):
+func delete(url:Text, data=NONE:Text, headers=["Content-Type: application/json", "Accept: application/json"] -> HTTPResponse):
return _send(DELETE, url, data, headers)
func main():