Created
May 3, 2017 02:02
-
-
Save mweagle/708637c449315034045178a8716e8f39 to your computer and use it in GitHub Desktop.
mock request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create an http.Request object with this data... | |
spartaResp := newSpartaMockHTTPResponse() | |
spartaReq := &http.Request{ | |
Method: "POST", | |
URL: &url.URL{ | |
Scheme: "http", | |
Path: fmt.Sprintf("/%s", functionName), | |
}, | |
Proto: "HTTP/1.1", | |
ProtoMajor: 1, | |
ProtoMinor: 1, | |
Body: eventBody, | |
ContentLength: eventBodySize, | |
TransferEncoding: make([]string, 0), | |
Host: "localhost", | |
} | |
cgoLambdaHTTPAdapter.lambdaHTTPHandlerInstance.ServeHTTP(spartaResp, spartaReq) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment