Skip to content

Commit

Permalink
修复错误响应格式问题
Browse files Browse the repository at this point in the history
  • Loading branch information
kesonan committed May 26, 2024
1 parent 11f65e9 commit 3520ade
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/tutorials/http/server/response-ext.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func loginHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.LoginRequest
if err := httpx.Parse(r, &req); err != nil {
httpx.ErrorCtx(r.Context(), w, err)
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
return
}
Expand Down Expand Up @@ -224,7 +224,7 @@ func loginHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.LoginRequest
if err := httpx.Parse(r, &req); err != nil {
httpx.ErrorCtx(r.Context(), w, err)
xhttp.XmlBaseResponseCtx(r.Context(), w, err)
return
}
Expand Down

0 comments on commit 3520ade

Please sign in to comment.