Need reference for writing a HTTP client library

Hello.

I want to write a client library that makes HTTP requests to a service and then parses the JSON response received and transform it to the appropriate type.

I have a very basic idea of how to go about doing this using reqwest and serde.

But I was wondering if there are any existing libraries that I can use as reference so that I can get some ideas about good practices and so that I do not end up reinventing the wheel poorly.

Let me know if I am being unclear.

Thanks.

I think this is the right way to go. After all, you have two steps in your process and the exact two libraries for it.
You might want to ponder async vs sync when it comes to reqwest, the answer depends largely on how you'd use your library.

1 Like

Need async

Well, then I guess you can get to implementing! :grinning:

1 Like

You can check out this earlier post for ideas.

2 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.