@@ -353,6 +353,10 @@ pub trait HttpContext: Context {
353
353
hostcalls:: add_map_value_bytes ( MapType :: HttpRequestHeaders , name, value) . unwrap ( )
354
354
}
355
355
356
+ fn remove_http_request_header ( & self , name : & str ) {
357
+ hostcalls:: remove_map_value ( MapType :: HttpRequestHeaders , name) . unwrap ( )
358
+ }
359
+
356
360
fn on_http_request_body ( & mut self , _body_size : usize , _end_of_stream : bool ) -> Action {
357
361
Action :: Continue
358
362
}
@@ -409,6 +413,10 @@ pub trait HttpContext: Context {
409
413
hostcalls:: add_map_value_bytes ( MapType :: HttpRequestTrailers , name, value) . unwrap ( )
410
414
}
411
415
416
+ fn remove_http_request_trailer ( & self , name : & str ) {
417
+ hostcalls:: remove_map_value ( MapType :: HttpRequestTrailers , name) . unwrap ( )
418
+ }
419
+
412
420
fn resume_http_request ( & self ) {
413
421
hostcalls:: resume_http_request ( ) . unwrap ( )
414
422
}
@@ -461,6 +469,10 @@ pub trait HttpContext: Context {
461
469
hostcalls:: add_map_value_bytes ( MapType :: HttpResponseHeaders , name, value) . unwrap ( )
462
470
}
463
471
472
+ fn remove_http_response_header ( & self , name : & str ) {
473
+ hostcalls:: remove_map_value ( MapType :: HttpResponseHeaders , name) . unwrap ( )
474
+ }
475
+
464
476
fn on_http_response_body ( & mut self , _body_size : usize , _end_of_stream : bool ) -> Action {
465
477
Action :: Continue
466
478
}
@@ -517,6 +529,10 @@ pub trait HttpContext: Context {
517
529
hostcalls:: add_map_value_bytes ( MapType :: HttpResponseTrailers , name, value) . unwrap ( )
518
530
}
519
531
532
+ fn remove_http_response_trailer ( & self , name : & str ) {
533
+ hostcalls:: remove_map_value ( MapType :: HttpResponseTrailers , name) . unwrap ( )
534
+ }
535
+
520
536
fn resume_http_response ( & self ) {
521
537
hostcalls:: resume_http_response ( ) . unwrap ( )
522
538
}
0 commit comments