Implement basic POST request for curl #30

Closed
ada wants to merge 36 commits from ada/curl-upload into main
Showing only changes of commit da1d1a1ef2 - Show all commits

View file

@ -34,7 +34,7 @@ func handleRequest(w http.ResponseWriter, r *http.Request) {
if UrlExist(clearPath) { if UrlExist(clearPath) {
if strings.HasSuffix(path, "/raw") { if strings.HasSuffix(path, "/raw") {
pasteContent := getContent(clearPath) pasteContent := getContent(clearPath)
w.Header().Set("Content-Type", "text/plain") w.Header().Set("Content-Type", "text/plain; charset=utf-8")
_, err := io.WriteString(w, pasteContent) _, err := io.WriteString(w, pasteContent)
if err != nil { if err != nil {
log.Println(err) log.Println(err)