@@ -31,7 +31,7 @@ func GetVMConfiguration(size int) ([]byte, error) {
3131 return ret , types .StatusToError (st )
3232}
3333
34- func SendHttpResponse (statusCode uint32 , headers [][ 2 ] string , body string ) types.Status {
34+ func SendHttpResponse (statusCode uint32 , headers types. Headers , body string ) types.Status {
3535 shs := SerializeMap (headers )
3636 hp := & shs [0 ]
3737 hl := len (shs )
@@ -45,7 +45,7 @@ func SetTickPeriodMilliSeconds(millSec uint32) error {
4545}
4646
4747func DispatchHttpCall (upstream string ,
48- headers [][ 2 ] string , body string , trailers [][ 2 ] string ,
48+ headers types. Headers , body string , trailers types. Trailers ,
4949 timeoutMillisecond uint32 , callBack HttpCalloutCallBack ) (calloutID uint32 , err error ) {
5050 shs := SerializeMap (headers )
5151 hp := & shs [0 ]
@@ -66,7 +66,7 @@ func DispatchHttpCall(upstream string,
6666 }
6767}
6868
69- func GetHttpCallResponseHeaders () ([][ 2 ] string , error ) {
69+ func GetHttpCallResponseHeaders () (types. Headers , error ) {
7070 ret , st := getMap (types .MapTypeHttpCallResponseHeaders )
7171 return ret , types .StatusToError (st )
7272}
@@ -76,7 +76,7 @@ func GetHttpCallResponseBody(start, maxSize int) ([]byte, error) {
7676 return ret , types .StatusToError (st )
7777}
7878
79- func GetHttpCallResponseTrailers () ([][ 2 ] string , error ) {
79+ func GetHttpCallResponseTrailers () (types. Trailers , error ) {
8080 ret , st := getMap (types .MapTypeHttpCallResponseTrailers )
8181 return ret , types .StatusToError (st )
8282}
@@ -91,12 +91,12 @@ func GetUpstreamData(start, maxSize int) ([]byte, error) {
9191 return ret , types .StatusToError (st )
9292}
9393
94- func GetHttpRequestHeaders () ([][ 2 ] string , error ) {
94+ func GetHttpRequestHeaders () (types. Headers , error ) {
9595 ret , st := getMap (types .MapTypeHttpRequestHeaders )
9696 return ret , types .StatusToError (st )
9797}
9898
99- func SetHttpRequestHeaders (headers [][ 2 ] string ) error {
99+ func SetHttpRequestHeaders (headers types. Headers ) error {
100100 return types .StatusToError (setMap (types .MapTypeHttpRequestHeaders , headers ))
101101}
102102
@@ -131,13 +131,13 @@ func SetHttpRequestBody(body []byte) error {
131131 return types .StatusToError (st )
132132}
133133
134- func GetHttpRequestTrailers () ([][ 2 ] string , error ) {
134+ func GetHttpRequestTrailers () (types. Trailers , error ) {
135135 ret , st := getMap (types .MapTypeHttpRequestTrailers )
136136 return ret , types .StatusToError (st )
137137}
138138
139- func SetHttpRequestTrailers (headers [][ 2 ] string ) error {
140- return types .StatusToError (setMap (types .MapTypeHttpRequestTrailers , headers ))
139+ func SetHttpRequestTrailers (trailers types. Trailers ) error {
140+ return types .StatusToError (setMap (types .MapTypeHttpRequestTrailers , trailers ))
141141}
142142
143143func GetHttpRequestTrailer (key string ) (string , error ) {
@@ -161,12 +161,12 @@ func ResumeHttpRequest() error {
161161 return types .StatusToError (rawhostcall .ProxyContinueStream (types .StreamTypeRequest ))
162162}
163163
164- func GetHttpResponseHeaders () ([][ 2 ] string , error ) {
164+ func GetHttpResponseHeaders () (types. Headers , error ) {
165165 ret , st := getMap (types .MapTypeHttpResponseHeaders )
166166 return ret , types .StatusToError (st )
167167}
168168
169- func SetHttpResponseHeaders (headers [][ 2 ] string ) error {
169+ func SetHttpResponseHeaders (headers types. Headers ) error {
170170 return types .StatusToError (setMap (types .MapTypeHttpResponseHeaders , headers ))
171171}
172172
@@ -201,13 +201,13 @@ func SetHttpResponseBody(body []byte) error {
201201 return types .StatusToError (st )
202202}
203203
204- func GetHttpResponseTrailers () ([][ 2 ] string , error ) {
204+ func GetHttpResponseTrailers () (types. Trailers , error ) {
205205 ret , st := getMap (types .MapTypeHttpResponseTrailers )
206206 return ret , types .StatusToError (st )
207207}
208208
209- func SetHttpResponseTrailers (headers [][ 2 ] string ) error {
210- return types .StatusToError (setMap (types .MapTypeHttpResponseTrailers , headers ))
209+ func SetHttpResponseTrailers (trailers types. Trailers ) error {
210+ return types .StatusToError (setMap (types .MapTypeHttpResponseTrailers , trailers ))
211211}
212212
213213func GetHttpResponseTrailer (key string ) (string , error ) {
0 commit comments