Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cohttp and eio instead of curly #44

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

gpetiot
Copy link
Member

@gpetiot gpetiot commented Sep 26, 2024

Undoing #12 and using eio instead of lwt

CHANGES.md Outdated Show resolved Hide resolved
gpetiot and others added 6 commits September 26, 2024 18:37
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@gpetiot
Copy link
Member Author

gpetiot commented Sep 26, 2024

Would love to get a sanity check about my use of cohttp-eio @samoht @talex5
I feel like I should functorize the IO to be able to have different types of Body and Client instead of just eio, but not sure it's worth the extra complexity, only okra is supposed to use this lib.

@@ -97,19 +97,50 @@ let version =

let info = Cmd.info "get-activity" ~version

module Client = struct
let null_auth ?ip:_ ~host:_ _ = Ok None
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We really should make a cohttp-eio-tls package with a proper authenticator.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can take a look at doing it this week.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, but I'm only going to work on this PR during Hacking Days, so no pressure!

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the example to use a proper authenticator now: mirage/ocaml-cohttp#1091

It's just:

let authenticator =
  match Ca_certs.authenticator () with
  | Ok x -> x
  | Error (`Msg m) -> Fmt.failwith "Failed to create system store X509 authenticator: %s" m

lib/graphql.mli Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants