Answer the question
In order to leave comments, you need to log in
Should I use fasthttp to create a json API library?
Hello, I recently finished writing a library for working with the JSON API of one toy. First, I wrote a client that makes requests using net/http. There was a standard http.Client in my client structure field. I received a request using NewRequestWithContext, set it up and calmly unloaded it into the structure after reading the body with the utility. Today I refactored the code, replacing the standard encoding/json with json-iterator. Instead of the net/http package, I connected fasthttp. The code has become smaller, it began to look more elegant. I tried it in practice - it accelerated. Here's what worries me:
Answer the question
In order to leave comments, you need to log in
I like fasthttp, but, unfortunately, I have to admit that the project has stagnated. The author of the project has lost interest in it and is already sawing another project . So, fasthttp still has a lot of shortcomings, if earlier it was possible to turn a blind eye to them, now they are gone. What made me return some of the projects to net/http:
It is not clear where the context is "cut out". If your solution works fine without context - why not?
About the second point - if there is no direct need for maximum performance, then the choice of a framework or library for the web does not matter. Enough standard http - good. If you want more convenient and readable code - you can use something else.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question