mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-11 00:40:00 +08:00
feat: add rest.WithSSE to build SSE route easier (#4729)
This commit is contained in:
@@ -105,7 +105,7 @@ func buildRequest(ctx context.Context, method, url string, data any) (*http.Requ
|
||||
req.URL.RawQuery = buildFormQuery(u, val[formKey])
|
||||
fillHeader(req, val[headerKey])
|
||||
if hasJsonBody {
|
||||
req.Header.Set(header.ContentType, header.JsonContentType)
|
||||
req.Header.Set(header.ContentType, header.ContentTypeJson)
|
||||
}
|
||||
|
||||
return req, nil
|
||||
|
||||
Reference in New Issue
Block a user