These are chat archives for gin-gonic/gin

14th
Nov 2016
JackTiger
@JackTiger
Nov 14 2016 12:03
Hi, can I add "/api/v1/object/{:obj_name}/presignedurl" to match "/api/v1/object/test/presignedurl" "/api/v1/object/test/demo1/presignedurl"
in gin
Thomas Boerger
@tboerger
Nov 14 2016 12:04
that should be possible.
JackTiger
@JackTiger
Nov 14 2016 12:05
How to write
I need wildcard character
like that
"/api/v1/object/test/presignedurl" "/api/v1/object/test/demo1/presignedurl"
"/api/v1/object/test/presignedurl" "/api/v1/object/test/demo2/presignedurl"
use "/api/v1/object/{:obj_name}/presignedurl" path
@tboerger
Thomas Boerger
@tboerger
Nov 14 2016 12:06
ah… allow also / within the parameter...
never tried that.
JackTiger
@JackTiger
Nov 14 2016 12:07
I just tried, and the program crash
Thomas Boerger
@tboerger
Nov 14 2016 12:08
maybe you can try router.GET(„/api/v1/object/*action/presignedurl", func(c *gin.Context) { }) but never tried it
JackTiger
@JackTiger
Nov 14 2016 12:08
router.GET(„/api/v1/object/obj_name/presignedurl", func(c gin.Context) { })??
No. It will crash
I just try
Thomas Boerger
@tboerger
Nov 14 2016 12:10
than i don’t know if it is currently possible.