Skip to content

thatstoasty/floki

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

floki

Mojo 25.4

A barebones HTTP/1.1 client for Mojo using only Mojo and external C calls.

Please check out the src/test.mojo for an example of how to use the client for now. I will add documentation later.

from floki.session import Session, TCPConnection

fn main() raises -> None:
    var client = Session()
    var response = client.post(
        "http://jsonplaceholder.typicode.com/todos",
        {"Content-Type": "application/json"},
        data={"key1": "value1", "key2": "value2"},
    )
    print("POST Response Status Code:", response.status_code)
    for pair in response.body.as_dict().items():
        print(pair.key, ":", pair.value)

About

Simple socket wrapper and http client for Mojo

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published