Will Norris 3b87ecf59d cmd/golink: support returning json response on save
after successfully saving a golink, return an HTML response only if the
request indicates it can accept text/html, otherwise return JSON.  This
allows for a very simple API:

  % curl -d short=foo -d long=http://foo.com/ go
  {"Short":"foo","Long":"http://foo.com/" ... }

Change-Id: I32e9c028207c5c7b8741d7dd31ebed35cf38a1de
2022-06-10 16:53:51 -07:00
2022-06-09 09:46:37 -07:00
2022-06-09 09:46:37 -07:00
2022-06-01 19:15:55 -07:00
S
Description
No description provided
BSD-3-Clause
389 KiB
Languages
Go 46.6%
CSS 30.4%
HTML 16.2%
Nix 4.2%
JavaScript 1.6%
Other 1%