Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GET method does not show the result #77

Open
debasishdas033 opened this issue Jan 30, 2021 · 1 comment
Open

GET method does not show the result #77

debasishdas033 opened this issue Jan 30, 2021 · 1 comment

Comments

@debasishdas033
Copy link

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

@florian-guillemard
Copy link

Hi,

Same problem here.. We are trying to get JSON and we get it just with iframe output !

Any solution @debasishdas033 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants