beego-shorturl

command
v0.0.0-...-97bb505 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2023 License: MIT Imports: 2 Imported by: 0

README

Shorturl

中文文档

This sample is a API application based on beego. It has two API func:

  • /v1/shorten
  • /v1/expand

Installation

cd $GOPATH/src/samples/shorturl
bee run

Usage:

# shortening url example
http://localhost:8080/v1/shorten/?longurl=http://google.com

{
  "UrlShort": "5laZG",
  "UrlLong": "http://google.com"
}

# expanding url example
http://localhost:8080/v1/expand/?shorturl=5laZG

{
  "UrlShort": "5laZG",
  "UrlLong": "http://google.com"
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL