Skip to content
Discussion options

You must be logged in to vote

I had to edit my code and add support for multipart, because i cant send request from swagger without it.

if strings.HasPrefix(req.Header.Get("Content-Type"), "multipart/") { r, err = supportMultiParRequest(req) if err != nil { logger.LogError("Invalid JSON data", err) renderer.Renderer.Error(req, res, http.StatusInternalServerError, err.Error()) return } } else { r, err = gzip.NewReader(req.Body) if err != nil { logger.LogError("Invalid JSON data", err) renderer.Renderer.Error(req, res, http.StatusInternalServerError, err.Error()) return } }

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@k0rmo0
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by k0rmo0
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants