Documentation ¶
Index ¶
- func Get2ndPathSegment(r *http.Request, firstSegment string) string
- func GetBodyAsString(r *http.Request) string
- func GetUrlComponents(r *http.Request) []string
- func ReplaceBodyWithString(r *http.Request, newStrBody string)
- func RespondWithError(w http.ResponseWriter, err *HttpError)
- type AppendResponseWriter
- type HttpError
- type ObserverResponseWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBodyAsString ¶
func GetUrlComponents ¶
Copied from OpenLamda src getUrlComponents parses request URL into its "/" delimated components
func ReplaceBodyWithString ¶
func RespondWithError ¶
func RespondWithError(w http.ResponseWriter, err *HttpError)
Types ¶
type AppendResponseWriter ¶
type AppendResponseWriter struct { Body []byte Status int // contains filtered or unexported fields }
func NewAppendResponseWriter ¶
func NewAppendResponseWriter() *AppendResponseWriter
func (*AppendResponseWriter) Header ¶
func (this *AppendResponseWriter) Header() http.Header
func (*AppendResponseWriter) Write ¶
func (this *AppendResponseWriter) Write(body []byte) (int, error)
func (*AppendResponseWriter) WriteHeader ¶
func (this *AppendResponseWriter) WriteHeader(status int)
type ObserverResponseWriter ¶
type ObserverResponseWriter struct { Body []byte Status int // contains filtered or unexported fields }
func NewObserverResponseWriter ¶
func NewObserverResponseWriter(rw http.ResponseWriter) *ObserverResponseWriter
func (*ObserverResponseWriter) Header ¶
func (this *ObserverResponseWriter) Header() http.Header
func (*ObserverResponseWriter) Write ¶
func (this *ObserverResponseWriter) Write(body []byte) (int, error)
func (*ObserverResponseWriter) WriteHeader ¶
func (this *ObserverResponseWriter) WriteHeader(status int)
Click to show internal directories.
Click to hide internal directories.