This commit is contained in:
2025-09-16 18:42:43 -04:00
commit ed50dc81dc
10 changed files with 2346 additions and 0 deletions

17
examples/basic.odin Normal file
View File

@@ -0,0 +1,17 @@
package examples
import "core:fmt"
import curl "../"
main :: proc() {
hCurl := curl.easy_init()
defer curl.easy_cleanup(hCurl)
if hCurl != nil {
curl.easy_setopt(hCurl, .URL, "https://example.com")
curl.easy_setopt(hCurl, .FOLLOWLOCATION, true)
res := curl.easy_perform(hCurl)
if res != .OK {
fmt.eprintln(curl.easy_strerror(res))
}
}
}