Allow internal server error using panic()

This commit is contained in:
Daan Sprenkels
2019-10-15 23:19:45 +02:00
parent 0ecdaafe2f
commit e193183f86
7 changed files with 43 additions and 22 deletions

View File

@@ -9,12 +9,12 @@ the command line.
## USAGE
# Upload a file
curl -F'file=@yourfile.png' <a href="{{Request.Host}}">{{Request.Host}}</a>
curl -F'file=@yourfile.png' <a href="{{.Request.Host}}">{{.Request.Host}}</a>
# Shorten a URL
curl -F'shorten=http://example.com/some/long/url' <a href="{{Request.Host}}">{{Request.Host}}</a>
curl -F'shorten=http://example.com/some/long/url' <a href="{{.Request.Host}}">{{.Request.Host}}</a>
# Shorten a URL with a token to delete it later
curl -F'shorten=http://example.com/some/long/url' -F'deleteToken=' <a href="{{Request.Host}}">{{Request.Host}}</a>
curl -F'shorten=http://example.com/some/long/url' -F'deleteToken=' <a href="{{.Request.Host}}">{{.Request.Host}}</a>
</pre>
{{end}}

View File

@@ -7,10 +7,10 @@ the command line.
## USAGE
# Upload a file
curl -F'file=@yourfile.png' {{Request.Host}}
curl -F'file=@yourfile.png' {{.Request.Host}}
# Shorten a URL
curl -F'shorten=http://example.com/some/long/url' {{Request.Host}}
curl -F'shorten=http://example.com/some/long/url' {{.Request.Host}}
# Shorten a URL with a token to delete it later
curl -F'shorten=http://example.com/some/long/url' -F'deleteToken=' {{Request.Host}}
curl -F'shorten=http://example.com/some/long/url' -F'deleteToken=' {{.Request.Host}}