File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,9 @@ type ProcessingResult interface {
3333 // GetStatusCode returns the status code of the response
3434 GetStatusCode () int
3535
36+ // SetStatusCode allows setting the status code of the response
37+ SetStatusCode (int )
38+
3639 // GetBody returns the body of the response
3740 GetBody () interface {}
3841}
@@ -65,6 +68,10 @@ func (r *Response) GetBody() interface{} {
6568 return r .Body
6669}
6770
71+ func (r * Response ) SetStatusCode (statusCode int ) {
72+ r .StatusCode = statusCode
73+ }
74+
6875type ResponseStream struct {
6976 body io.ReadCloser
7077 contentType string
@@ -143,6 +150,11 @@ func (s *ResponseStream) GetHeaders() map[string]interface{} {
143150func (s * ResponseStream ) GetStatusCode () int {
144151 return s .statusCode
145152}
153+
154+ func (s * ResponseStream ) SetStatusCode (statusCode int ) {
155+ s .statusCode = statusCode
156+ }
157+
146158func (s * ResponseStream ) GetBody () interface {} {
147159 return s .body
148160}
You can’t perform that action at this time.
0 commit comments