Skip to content

Commit

Permalink
Split http module into multiple files
Browse files Browse the repository at this point in the history
Signed-off-by: Brian Grenier <[email protected]>
  • Loading branch information
bgreni committed Sep 27, 2024
1 parent bd14814 commit d7cdfd4
Show file tree
Hide file tree
Showing 8 changed files with 411 additions and 370 deletions.
1 change: 1 addition & 0 deletions lightbug_http/header.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ struct HeaderKey:
alias CONTENT_TYPE = "content-type"
alias CONTENT_LENGTH = "content-length"
alias CONTENT_ENCODING = "content-encoding"
alias TRANSFER_ENCODING = "transfer-encoding"
alias DATE = "date"
alias LOCATION = "location"
alias HOST = "host"
Expand Down
369 changes: 0 additions & 369 deletions lightbug_http/http.mojo

This file was deleted.

13 changes: 13 additions & 0 deletions lightbug_http/http/__init__.mojo
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from .common_response import *
from .response import *
from .request import *


@always_inline
fn encode(owned req: HTTPRequest) -> Bytes:
return req._encoded()


@always_inline
fn encode(owned res: HTTPResponse) -> Bytes:
return res._encoded()
Loading

0 comments on commit d7cdfd4

Please sign in to comment.