Open debasishdas033 opened 3 years ago
package main
import ( “fmt” “net/http” “github.com/gorilla/mux” ) func showRecord(w http.ResponseWriter, r *http.Request) { out :=“Hello World” w.Header().Set(“Content-Type”, “text/plain”) fmt.Fprintf(w,out)
} func handleRequests() { router :=mux.NewRouter() router.HandleFunc("/dashboard/show",showRecord).Methods(“GET”) http.ListenAndServe(":8080", router) }
func main() { handleRequests() }
In ryantx-ajax-panel I am able to get the output using iframe. But when using GET method in the panel getting the below error
Request Error {“data”:{“message”:“Unexpected error”}}
Please guide how to get the output using GET method instead of iframe.
Thanks, Debasish
Hi,
Same problem here.. We are trying to get JSON and we get it just with iframe output !
Any solution @debasishdas033 ?
package main
import ( “fmt” “net/http” “github.com/gorilla/mux” ) func showRecord(w http.ResponseWriter, r *http.Request) { out :=“Hello World” w.Header().Set(“Content-Type”, “text/plain”) fmt.Fprintf(w,out)
} func handleRequests() { router :=mux.NewRouter() router.HandleFunc("/dashboard/show",showRecord).Methods(“GET”) http.ListenAndServe(":8080", router) }
func main() { handleRequests() }
In ryantx-ajax-panel I am able to get the output using iframe. But when using GET method in the panel getting the below error
Request Error {“data”:{“message”:“Unexpected error”}}
Please guide how to get the output using GET method instead of iframe.
Thanks, Debasish