1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-11-24 08:02:32 +02:00
go-micro/examples/redirect
2021-01-20 21:28:48 +00:00
..
main.go examples at v3 2021-01-20 21:28:48 +00:00
README.md Add examples 2020-12-26 15:17:20 +00:00

Redirect

This demonstrates how to http redirect using an API service

## Usage

Run the micro API

micro --registry=mdns api

Run the redirect API

go run main.go --registry=mdns

Make request

curl -v http://localhost:8080/redirect/url

Should return

HTTP/1.1 301 Moved Permanently
Location: https://google.com