December 2017
Intermediate to advanced
316 pages
6h 58m
English
The preceding program is trying to implement a REST service using httprouter. We are defining two routes here:
The :name here is the path parameter. It indicates the API that shows the file named xyz. The basic Go router cannot handle these parameters, by using httprouter, we can also match the REST methods. In the program, we matched GET requests.
In a step-by-step process, the preceding program:
Read now
Unlock full access