Answer the question
In order to leave comments, you need to log in
Why might a 404 error occur?
r := mux.NewRouter().StrictSlash(true)
//type = [order,user]
r.HandleFunc("/api/photo/{type}/{type_id}/{file_id}", request.DownloadFile).Methods("GET")
r.HandleFunc("/api/photo/{type}/{type_id}/{file_id}", request.DeleteFile).Methods("DELETE")
r.HandleFunc("/api/photo/{type}", request.UploadFile).Methods("POST")
err := http.ListenAndServe(":8080",r)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question