February 2020
Intermediate to advanced
404 pages
8h 42m
English
A path parameter in the URL of an HTTP GET request looks like this:
https://example.org/articles/books/123
Since it is passed after the base URL and API endpoint, in this case https://example.org/articles/, they are called path parameters. In the preceding URL, books and 123 are path parameters. Let us see an example of how to create routes that can consume data supplied as path parameters. Follow these steps:
touch -p $GOPATH/src/github.com/git-user/chapter2/muxRouter/main.go
Read now
Unlock full access