diff options
| author | WintonChan <cw_hao@163.com> | 2021-02-23 11:42:29 +0800 |
|---|---|---|
| committer | WintonChan <cw_hao@163.com> | 2021-05-31 10:09:49 +0800 |
| commit | 4715b79958e76d24dcad6f08a7aa145a75b7581b (patch) | |
| tree | a6db2400ac82c25aaabd47a438236fbedcd59203 /common/types | |
| parent | add servicebus (diff) | |
| download | kubeedge-4715b79958e76d24dcad6f08a7aa145a75b7581b.tar.gz | |
modify rest provider of router to return response
Signed-off-by: WintonChan <cw_hao@163.com>
Diffstat (limited to 'common/types')
| -rw-r--r-- | common/types/http.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/common/types/http.go b/common/types/http.go new file mode 100644 index 000000000..ba704ca6b --- /dev/null +++ b/common/types/http.go @@ -0,0 +1,18 @@ +package types + +import "net/http" + +// HTTPRequest is used structure used to unmarshal message content from cloud +type HTTPRequest struct { + Header http.Header `json:"header"` + Body []byte `json:"body"` + Method string `json:"method"` + URL string `json:"url"` +} + +// HTTPResponse is HTTP request's response structure used to send response to cloud +type HTTPResponse struct { + Header http.Header `json:"header"` + StatusCode int `json:"status_code"` + Body []byte `json:"body"` +} |
