Skip to content

lumixing/odin-http-ws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

odin-http-ws

a simple http(1.1)/websocket client/server library for odin. uses laytan's openssl bindings for secure connections.

Important

currently under development!

Warning

this is made for personal use, might not work as expected, use with caution!
you might want to check out https://github.com/laytan/odin-http.

http client example

a simple discord webhook:

package main

import "http"

main :: proc() {
	URL :: `https://discord.com/api/webhooks/.../...`
	BODY :: `{"content":"hello, world! :D"}`

	req: http.Request
	defer request_delete(&req)
	res: http.Response
	defer response_delete(&res)

	http.headers_set_content_type(&req.headers, .application_json)
	http.post(&req, &res, URL, BODY)
}

roadmap

  • http client
    • secure connections using openssl
    • all methods working
    • json support
    • complete memory management
    • chunked responses
    • no blocking
  • http server
  • ws client
    • json support
    • chunked responses
    • no blocking
  • ws server

About

http/websocket client/server library for odin

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages