Documentation ¶ Index ¶ type Server func (server *Server) Handle(w http.ResponseWriter, req *http.Request) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Server ¶ type Server struct { APIKey string Processor func(w http.ResponseWriter, req *http.Request) Called map[string]int } Server emulates a RapidAPI endpoint func (*Server) Handle ¶ func (server *Server) Handle(w http.ResponseWriter, req *http.Request) Handle implements the RapidAPI endpoint. It validates that the x-rapidapi-key and then calls Handler.Processor. The endpoint "/slow" sleeps for 60 seconds, allowing timeout conditions to be tested. Source Files ¶ View all Source files server.go Click to show internal directories. Click to hide internal directories.