2018-12-12から1日間の記事一覧
概要 文字通りhttpのredirectを行う機能です。 下記の通り、構文はシンプルです。 http.Redirect(w http.ResponseWriter, r *http.Request, url string, code int) 最後のコードはstatus codeです。「http.StatusFound」のように記述します。 今回の例は、vi…
概要 文字通りhttpのredirectを行う機能です。 下記の通り、構文はシンプルです。 http.Redirect(w http.ResponseWriter, r *http.Request, url string, code int) 最後のコードはstatus codeです。「http.StatusFound」のように記述します。 今回の例は、vi…