aboutsummaryrefslogtreecommitdiff
path: root/examples/http/http.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-11-05 15:18:32 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-11-05 15:18:32 -0500
commitb8d7eabc023bf9db0150049d8e909086f6ad91bc (patch)
tree5b678c7949638b3f07095affc04611f0422ef8c7 /examples/http/http.tm
parent2fa26e6af3ec1599396d9260ef44b0d035b1f686 (diff)
Deprecate bit-width integer/num literals in favor of using type
constructors
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 934c8690..f64a5048 100644
--- a/examples/http/http.tm
+++ b/examples/http/http.tm
@@ -64,7 +64,7 @@ func _send(method:_Method, url:Text, data:Text?, headers=[:Text] -> HTTPResponse
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk);
}
- code := 0[64]
+ code := Int64(0)
inline C {
CURLcode res = curl_easy_perform(curl);
if (res != CURLE_OK)
@@ -75,7 +75,7 @@ func _send(method:_Method, url:Text, data:Text?, headers=[:Text] -> HTTPResponse
curl_slist_free_all(chunk);
curl_easy_cleanup(curl);
}
- return HTTPResponse(code, "":join(chunks))
+ return HTTPResponse(Int(code), "":join(chunks))
func get(url:Text, headers=[:Text] -> HTTPResponse):
return _send(GET, url, !Text, headers)