I'm trying to create a custom function that passes the Request object back as a result:
func ConstructRequest(testParameters string, reqType string) Request {
req, err := http.NewRequest(reqType, testPath+testParameters, nil)
if err != nil {
log.Fatal(err)
return nil
} else {
return req
}
}
but I'm getting a "undefined: Request" error
I'm not sure what library I need to import to make it work?