github.com/micro/go-micro/examples@v0.0.0-20210105173217-bf4ab679e18b/redirect/README.md (about) 1 # Redirect 2 3 This demonstrates how to http redirect using an API service 4 5 ## Usage 6 7 Run the micro API 8 9 ``` 10 micro --registry=mdns api 11 ``` 12 13 Run the redirect API 14 15 ``` 16 go run main.go --registry=mdns 17 ``` 18 19 Make request 20 ``` 21 curl -v http://localhost:8080/redirect/url 22 ``` 23 24 Should return 25 26 ``` 27 HTTP/1.1 301 Moved Permanently 28 Location: https://google.com 29 ```