aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/base64/base64.tm4
-rw-r--r--examples/http/http.tm4
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/base64/base64.tm b/examples/base64/base64.tm
index f3762628..bed94ac1 100644
--- a/examples/base64/base64.tm
+++ b/examples/base64/base64.tm
@@ -59,10 +59,10 @@ lang Base64:
output[dest+2] = _EQUAL_BYTE
output[dest+3] = _EQUAL_BYTE
- return Base64.without_escaping(Text.from_bytes(output) or return !Base64)
+ return Base64.without_escaping(Text.from_bytes(output) or return NONE)
func decode_text(b64:Base64 -> Text?):
- return Text.from_bytes(b64:decode_bytes() or return !Text)
+ return Text.from_bytes(b64:decode_bytes() or return NONE)
func decode_bytes(b64:Base64 -> [Byte]?):
bytes := b64.text_content:bytes()
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():