(component (type (;0;) (component (type (;0;) (instance (export (;0;) "pollable" (type (sub resource))) ) ) (import "wasi:io/poll@0.2.0-rc-2023-11-10" (instance (;0;) (type 0))) (alias export 0 "pollable" (type (;1;))) (type (;2;) (instance (alias outer 1 1 (type (;0;))) (export (;1;) "pollable" (type (eq 0))) (type (;2;) u64) (export (;3;) "instant" (type (eq 2))) (type (;4;) u64) (export (;5;) "duration" (type (eq 4))) ) ) (import "wasi:clocks/monotonic-clock@0.2.0-rc-2023-11-10" (instance (;1;) (type 2))) (type (;3;) (instance (export (;0;) "error" (type (sub resource))) ) ) (import "wasi:io/error@0.2.0-rc-2023-11-10" (instance (;2;) (type 3))) (alias export 2 "error" (type (;4;))) (type (;5;) (instance (alias outer 1 4 (type (;0;))) (export (;1;) "error" (type (eq 0))) (alias outer 1 1 (type (;2;))) (export (;3;) "pollable" (type (eq 2))) (type (;4;) (own 1)) (type (;5;) (variant (case "last-operation-failed" 4) (case "closed"))) (export (;6;) "stream-error" (type (eq 5))) (export (;7;) "input-stream" (type (sub resource))) (export (;8;) "output-stream" (type (sub resource))) ) ) (import "wasi:io/streams@0.2.0-rc-2023-11-10" (instance (;3;) (type 5))) (alias export 1 "duration" (type (;6;))) (alias export 3 "input-stream" (type (;7;))) (alias export 3 "output-stream" (type (;8;))) (type (;9;) (instance (alias outer 1 6 (type (;0;))) (export (;1;) "duration" (type (eq 0))) (alias outer 1 7 (type (;2;))) (export (;3;) "input-stream" (type (eq 2))) (alias outer 1 8 (type (;4;))) (export (;5;) "output-stream" (type (eq 4))) (alias outer 1 4 (type (;6;))) (export (;7;) "io-error" (type (eq 6))) (alias outer 1 1 (type (;8;))) (export (;9;) "pollable" (type (eq 8))) (type (;10;) (variant (case "get") (case "head") (case "post") (case "put") (case "delete") (case "connect") (case "options") (case "trace") (case "patch") (case "other" string))) (export (;11;) "method" (type (eq 10))) (type (;12;) (variant (case "HTTP") (case "HTTPS") (case "other" string))) (export (;13;) "scheme" (type (eq 12))) (type (;14;) (option string)) (type (;15;) (option u16)) (type (;16;) (record (field "rcode" 14) (field "info-code" 15))) (export (;17;) "DNS-error-payload" (type (eq 16))) (type (;18;) (option u8)) (type (;19;) (record (field "alert-id" 18) (field "alert-message" 14))) (export (;20;) "TLS-alert-received-payload" (type (eq 19))) (type (;21;) (option u32)) (type (;22;) (record (field "field-name" 14) (field "field-size" 21))) (export (;23;) "field-size-payload" (type (eq 22))) (type (;24;) (option u64)) (type (;25;) (option 23)) (type (;26;) (variant (case "DNS-timeout") (case "DNS-error" 17) (case "destination-not-found") (case "destination-unavailable") (case "destination-IP-prohibited") (case "destination-IP-unroutable") (case "connection-refused") (case "connection-terminated") (case "connection-timeout") (case "connection-read-timeout") (case "connection-write-timeout") (case "connection-limit-reached") (case "TLS-protocol-error") (case "TLS-certificate-error") (case "TLS-alert-received" 20) (case "HTTP-request-denied") (case "HTTP-request-length-required") (case "HTTP-request-body-size" 24) (case "HTTP-request-method-invalid") (case "HTTP-request-URI-invalid") (case "HTTP-request-URI-too-long") (case "HTTP-request-header-section-size" 21) (case "HTTP-request-header-size" 25) (case "HTTP-request-trailer-section-size" 21) (case "HTTP-request-trailer-size" 23) (case "HTTP-response-incomplete") (case "HTTP-response-header-section-size" 21) (case "HTTP-response-header-size" 23) (case "HTTP-response-body-size" 24) (case "HTTP-response-trailer-section-size" 21) (case "HTTP-response-trailer-size" 23) (case "HTTP-response-transfer-coding" 14) (case "HTTP-response-content-coding" 14) (case "HTTP-response-timeout") (case "HTTP-upgrade-failed") (case "HTTP-protocol-error") (case "loop-detected") (case "configuration-error") (case "internal-error" 14))) (export (;27;) "error-code" (type (eq 26))) (type (;28;) (variant (case "invalid-syntax") (case "forbidden") (case "immutable"))) (export (;29;) "header-error" (type (eq 28))) (type (;30;) string) (export (;31;) "field-key" (type (eq 30))) (type (;32;) (list u8)) (export (;33;) "field-value" (type (eq 32))) (export (;34;) "fields" (type (sub resource))) (export (;35;) "headers" (type (eq 34))) (export (;36;) "trailers" (type (eq 34))) (export (;37;) "incoming-request" (type (sub resource))) (export (;38;) "outgoing-request" (type (sub resource))) (export (;39;) "request-options" (type (sub resource))) (export (;40;) "response-outparam" (type (sub resource))) (type (;41;) u16) (export (;42;) "status-code" (type (eq 41))) (export (;43;) "incoming-response" (type (sub resource))) (export (;44;) "incoming-body" (type (sub resource))) (export (;45;) "future-trailers" (type (sub resource))) (export (;46;) "outgoing-response" (type (sub resource))) (export (;47;) "outgoing-body" (type (sub resource))) (export (;48;) "future-incoming-response" (type (sub resource))) (type (;49;) (own 34)) (type (;50;) (func (result 49))) (export (;0;) "[constructor]fields" (func (type 50))) (type (;51;) (tuple 31 33)) (type (;52;) (list 51)) (type (;53;) (result 49 (error 29))) (type (;54;) (func (param "entries" 52) (result 53))) (export (;1;) "[static]fields.from-list" (func (type 54))) (type (;55;) (borrow 34)) (type (;56;) (list 33)) (type (;57;) (func (param "self" 55) (param "name" 31) (result 56))) (export (;2;) "[method]fields.get" (func (type 57))) (type (;58;) (func (param "self" 55) (param "name" 31) (result bool))) (export (;3;) "[method]fields.has" (func (type 58))) (type (;59;) (result (error 29))) (type (;60;) (func (param "self" 55) (param "name" 31) (param "value" 56) (result 59))) (export (;4;) "[method]fields.set" (func (type 60))) (type (;61;) (func (param "self" 55) (param "name" 31) (result 59))) (export (;5;) "[method]fields.delete" (func (type 61))) (type (;62;) (func (param "self" 55) (param "name" 31) (param "value" 33) (result 59))) (export (;6;) "[method]fields.append" (func (type 62))) (type (;63;) (func (param "self" 55) (result 52))) (export (;7;) "[method]fields.entries" (func (type 63))) (type (;64;) (func (param "self" 55) (result 49))) (export (;8;) "[method]fields.clone" (func (type 64))) (type (;65;) (borrow 37)) (type (;66;) (func (param "self" 65) (result 11))) (export (;9;) "[method]incoming-request.method" (func (type 66))) (type (;67;) (func (param "self" 65) (result 14))) (export (;10;) "[method]incoming-request.path-with-query" (func (type 67))) (type (;68;) (option 13)) (type (;69;) (func (param "self" 65) (result 68))) (export (;11;) "[method]incoming-request.scheme" (func (type 69))) (export (;12;) "[method]incoming-request.authority" (func (type 67))) (type (;70;) (own 35)) (type (;71;) (func (param "self" 65) (result 70))) (export (;13;) "[method]incoming-request.headers" (func (type 71))) (type (;72;) (own 44)) (type (;73;) (result 72)) (type (;74;) (func (param "self" 65) (result 73))) (export (;14;) "[method]incoming-request.consume" (func (type 74))) (type (;75;) (own 38)) (type (;76;) (func (param "headers" 70) (result 75))) (export (;15;) "[constructor]outgoing-request" (func (type 76))) (type (;77;) (borrow 38)) (type (;78;) (own 47)) (type (;79;) (result 78)) (type (;80;) (func (param "self" 77) (result 79))) (export (;16;) "[method]outgoing-request.body" (func (type 80))) (type (;81;) (func (param "self" 77) (result 11))) (export (;17;) "[method]outgoing-request.method" (func (type 81))) (type (;82;) (result)) (type (;83;) (func (param "self" 77) (param "method" 11) (result 82))) (export (;18;) "[method]outgoing-request.set-method" (func (type 83))) (type (;84;) (func (param "self" 77) (result 14))) (export (;19;) "[method]outgoing-request.path-with-query" (func (type 84))) (type (;85;) (func (param "self" 77) (param "path-with-query" 14) (result 82))) (export (;20;) "[method]outgoing-request.set-path-with-query" (func (type 85))) (type (;86;) (func (param "self" 77) (result 68))) (export (;21;) "[method]outgoing-request.scheme" (func (type 86))) (type (;87;) (func (param "self" 77) (param "scheme" 68) (result 82))) (export (;22;) "[method]outgoing-request.set-scheme" (func (type 87))) (export (;23;) "[method]outgoing-request.authority" (func (type 84))) (type (;88;) (func (param "self" 77) (param "authority" 14) (result 82))) (export (;24;) "[method]outgoing-request.set-authority" (func (type 88))) (type (;89;) (func (param "self" 77) (result 70))) (export (;25;) "[method]outgoing-request.headers" (func (type 89))) (type (;90;) (own 39)) (type (;91;) (func (result 90))) (export (;26;) "[constructor]request-options" (func (type 91))) (type (;92;) (borrow 39)) (type (;93;) (option 1)) (type (;94;) (func (param "self" 92) (result 93))) (export (;27;) "[method]request-options.connect-timeout" (func (type 94))) (type (;95;) (func (param "self" 92) (param "duration" 93) (result 82))) (export (;28;) "[method]request-options.set-connect-timeout" (func (type 95))) (export (;29;) "[method]request-options.first-byte-timeout" (func (type 94))) (export (;30;) "[method]request-options.set-first-byte-timeout" (func (type 95))) (export (;31;) "[method]request-options.between-bytes-timeout" (func (type 94))) (export (;32;) "[method]request-options.set-between-bytes-timeout" (func (type 95))) (type (;96;) (own 40)) (type (;97;) (own 46)) (type (;98;) (result 97 (error 27))) (type (;99;) (func (param "param" 96) (param "response" 98))) (export (;33;) "[static]response-outparam.set" (func (type 99))) (type (;100;) (borrow 43)) (type (;101;) (func (param "self" 100) (result 42))) (export (;34;) "[method]incoming-response.status" (func (type 101))) (type (;102;) (func (param "self" 100) (result 70))) (export (;35;) "[method]incoming-response.headers" (func (type 102))) (type (;103;) (func (param "self" 100) (result 73))) (export (;36;) "[method]incoming-response.consume" (func (type 103))) (type (;104;) (borrow 44)) (type (;105;) (own 3)) (type (;106;) (result 105)) (type (;107;) (func (param "self" 104) (result 106))) (export (;37;) "[method]incoming-body.stream" (func (type 107))) (type (;108;) (own 45)) (type (;109;) (func (param "this" 72) (result 108))) (export (;38;) "[static]incoming-body.finish" (func (type 109))) (type (;110;) (borrow 45)) (type (;111;) (own 9)) (type (;112;) (func (param "self" 110) (result 111))) (export (;39;) "[method]future-trailers.subscribe" (func (type 112))) (type (;113;) (own 36)) (type (;114;) (option 113)) (type (;115;) (result 114 (error 27))) (type (;116;) (result 115)) (type (;117;) (option 116)) (type (;118;) (func (param "self" 110) (result 117))) (export (;40;) "[method]future-trailers.get" (func (type 118))) (type (;119;) (func (param "headers" 70) (result 97))) (export (;41;) "[constructor]outgoing-response" (func (type 119))) (type (;120;) (borrow 46)) (type (;121;) (func (param "self" 120) (result 42))) (export (;42;) "[method]outgoing-response.status-code" (func (type 121))) (type (;122;) (func (param "self" 120) (param "status-code" 42) (result 82))) (export (;43;) "[method]outgoing-response.set-status-code" (func (type 122))) (type (;123;) (func (param "self" 120) (result 70))) (export (;44;) "[method]outgoing-response.headers" (func (type 123))) (type (;124;) (func (param "self" 120) (result 79))) (export (;45;) "[method]outgoing-response.body" (func (type 124))) (type (;125;) (borrow 47)) (type (;126;) (own 5)) (type (;127;) (result 126)) (type (;128;) (func (param "self" 125) (result 127))) (export (;46;) "[method]outgoing-body.write" (func (type 128))) (type (;129;) (result (error 27))) (type (;130;) (func (param "this" 78) (param "trailers" 114) (result 129))) (export (;47;) "[static]outgoing-body.finish" (func (type 130))) (type (;131;) (borrow 48)) (type (;132;) (func (param "self" 131) (result 111))) (export (;48;) "[method]future-incoming-response.subscribe" (func (type 132))) (type (;133;) (own 43)) (type (;134;) (result 133 (error 27))) (type (;135;) (result 134)) (type (;136;) (option 135)) (type (;137;) (func (param "self" 131) (result 136))) (export (;49;) "[method]future-incoming-response.get" (func (type 137))) (type (;138;) (borrow 7)) (type (;139;) (option 27)) (type (;140;) (func (param "err" 138) (result 139))) (export (;50;) "http-error-code" (func (type 140))) ) ) (export (;4;) "wasi:http/types@0.2.0-rc-2023-12-05" (instance (type 9))) ) ) (export (;1;) "types" (type 0)) (type (;2;) (component (type (;0;) (instance (export (;0;) "pollable" (type (sub resource))) ) ) (import "wasi:io/poll@0.2.0-rc-2023-11-10" (instance (;0;) (type 0))) (alias export 0 "pollable" (type (;1;))) (type (;2;) (instance (alias outer 1 1 (type (;0;))) (export (;1;) "pollable" (type (eq 0))) (type (;2;) u64) (export (;3;) "instant" (type (eq 2))) (type (;4;) u64) (export (;5;) "duration" (type (eq 4))) ) ) (import "wasi:clocks/monotonic-clock@0.2.0-rc-2023-11-10" (instance (;1;) (type 2))) (type (;3;) (instance (export (;0;) "error" (type (sub resource))) ) ) (import "wasi:io/error@0.2.0-rc-2023-11-10" (instance (;2;) (type 3))) (alias export 2 "error" (type (;4;))) (type (;5;) (instance (alias outer 1 4 (type (;0;))) (export (;1;) "error" (type (eq 0))) (alias outer 1 1 (type (;2;))) (export (;3;) "pollable" (type (eq 2))) (type (;4;) (own 1)) (type (;5;) (variant (case "last-operation-failed" 4) (case "closed"))) (export (;6;) "stream-error" (type (eq 5))) (export (;7;) "input-stream" (type (sub resource))) (export (;8;) "output-stream" (type (sub resource))) ) ) (import "wasi:io/streams@0.2.0-rc-2023-11-10" (instance (;3;) (type 5))) (alias export 1 "duration" (type (;6;))) (alias export 3 "input-stream" (type (;7;))) (alias export 3 "output-stream" (type (;8;))) (type (;9;) (instance (alias outer 1 6 (type (;0;))) (export (;1;) "duration" (type (eq 0))) (alias outer 1 7 (type (;2;))) (export (;3;) "input-stream" (type (eq 2))) (alias outer 1 8 (type (;4;))) (export (;5;) "output-stream" (type (eq 4))) (alias outer 1 4 (type (;6;))) (export (;7;) "io-error" (type (eq 6))) (alias outer 1 1 (type (;8;))) (export (;9;) "pollable" (type (eq 8))) (type (;10;) (variant (case "get") (case "head") (case "post") (case "put") (case "delete") (case "connect") (case "options") (case "trace") (case "patch") (case "other" string))) (export (;11;) "method" (type (eq 10))) (type (;12;) (variant (case "HTTP") (case "HTTPS") (case "other" string))) (export (;13;) "scheme" (type (eq 12))) (type (;14;) (option string)) (type (;15;) (option u16)) (type (;16;) (record (field "rcode" 14) (field "info-code" 15))) (export (;17;) "DNS-error-payload" (type (eq 16))) (type (;18;) (option u8)) (type (;19;) (record (field "alert-id" 18) (field "alert-message" 14))) (export (;20;) "TLS-alert-received-payload" (type (eq 19))) (type (;21;) (option u32)) (type (;22;) (record (field "field-name" 14) (field "field-size" 21))) (export (;23;) "field-size-payload" (type (eq 22))) (type (;24;) (option u64)) (type (;25;) (option 23)) (type (;26;) (variant (case "DNS-timeout") (case "DNS-error" 17) (case "destination-not-found") (case "destination-unavailable") (case "destination-IP-prohibited") (case "destination-IP-unroutable") (case "connection-refused") (case "connection-terminated") (case "connection-timeout") (case "connection-read-timeout") (case "connection-write-timeout") (case "connection-limit-reached") (case "TLS-protocol-error") (case "TLS-certificate-error") (case "TLS-alert-received" 20) (case "HTTP-request-denied") (case "HTTP-request-length-required") (case "HTTP-request-body-size" 24) (case "HTTP-request-method-invalid") (case "HTTP-request-URI-invalid") (case "HTTP-request-URI-too-long") (case "HTTP-request-header-section-size" 21) (case "HTTP-request-header-size" 25) (case "HTTP-request-trailer-section-size" 21) (case "HTTP-request-trailer-size" 23) (case "HTTP-response-incomplete") (case "HTTP-response-header-section-size" 21) (case "HTTP-response-header-size" 23) (case "HTTP-response-body-size" 24) (case "HTTP-response-trailer-section-size" 21) (case "HTTP-response-trailer-size" 23) (case "HTTP-response-transfer-coding" 14) (case "HTTP-response-content-coding" 14) (case "HTTP-response-timeout") (case "HTTP-upgrade-failed") (case "HTTP-protocol-error") (case "loop-detected") (case "configuration-error") (case "internal-error" 14))) (export (;27;) "error-code" (type (eq 26))) (type (;28;) (variant (case "invalid-syntax") (case "forbidden") (case "immutable"))) (export (;29;) "header-error" (type (eq 28))) (type (;30;) string) (export (;31;) "field-key" (type (eq 30))) (type (;32;) (list u8)) (export (;33;) "field-value" (type (eq 32))) (export (;34;) "fields" (type (sub resource))) (export (;35;) "headers" (type (eq 34))) (export (;36;) "trailers" (type (eq 34))) (export (;37;) "incoming-request" (type (sub resource))) (export (;38;) "outgoing-request" (type (sub resource))) (export (;39;) "request-options" (type (sub resource))) (export (;40;) "response-outparam" (type (sub resource))) (type (;41;) u16) (export (;42;) "status-code" (type (eq 41))) (export (;43;) "incoming-response" (type (sub resource))) (export (;44;) "incoming-body" (type (sub resource))) (export (;45;) "future-trailers" (type (sub resource))) (export (;46;) "outgoing-response" (type (sub resource))) (export (;47;) "outgoing-body" (type (sub resource))) (export (;48;) "future-incoming-response" (type (sub resource))) ) ) (import "wasi:http/types@0.2.0-rc-2023-12-05" (instance (;4;) (type 9))) (alias export 4 "incoming-request" (type (;10;))) (alias export 4 "response-outparam" (type (;11;))) (type (;12;) (instance (alias outer 1 10 (type (;0;))) (export (;1;) "incoming-request" (type (eq 0))) (alias outer 1 11 (type (;2;))) (export (;3;) "response-outparam" (type (eq 2))) (type (;4;) (own 1)) (type (;5;) (own 3)) (type (;6;) (func (param "request" 4) (param "response-out" 5))) (export (;0;) "handle" (func (type 6))) ) ) (export (;5;) "wasi:http/incoming-handler@0.2.0-rc-2023-12-05" (instance (type 12))) ) ) (export (;3;) "incoming-handler" (type 2)) (type (;4;) (component (type (;0;) (instance (export (;0;) "pollable" (type (sub resource))) ) ) (import "wasi:io/poll@0.2.0-rc-2023-11-10" (instance (;0;) (type 0))) (alias export 0 "pollable" (type (;1;))) (type (;2;) (instance (alias outer 1 1 (type (;0;))) (export (;1;) "pollable" (type (eq 0))) (type (;2;) u64) (export (;3;) "instant" (type (eq 2))) (type (;4;) u64) (export (;5;) "duration" (type (eq 4))) ) ) (import "wasi:clocks/monotonic-clock@0.2.0-rc-2023-11-10" (instance (;1;) (type 2))) (type (;3;) (instance (export (;0;) "error" (type (sub resource))) ) ) (import "wasi:io/error@0.2.0-rc-2023-11-10" (instance (;2;) (type 3))) (alias export 2 "error" (type (;4;))) (type (;5;) (instance (alias outer 1 4 (type (;0;))) (export (;1;) "error" (type (eq 0))) (alias outer 1 1 (type (;2;))) (export (;3;) "pollable" (type (eq 2))) (type (;4;) (own 1)) (type (;5;) (variant (case "last-operation-failed" 4) (case "closed"))) (export (;6;) "stream-error" (type (eq 5))) (export (;7;) "input-stream" (type (sub resource))) (export (;8;) "output-stream" (type (sub resource))) ) ) (import "wasi:io/streams@0.2.0-rc-2023-11-10" (instance (;3;) (type 5))) (alias export 1 "duration" (type (;6;))) (alias export 3 "input-stream" (type (;7;))) (alias export 3 "output-stream" (type (;8;))) (type (;9;) (instance (alias outer 1 6 (type (;0;))) (export (;1;) "duration" (type (eq 0))) (alias outer 1 7 (type (;2;))) (export (;3;) "input-stream" (type (eq 2))) (alias outer 1 8 (type (;4;))) (export (;5;) "output-stream" (type (eq 4))) (alias outer 1 4 (type (;6;))) (export (;7;) "io-error" (type (eq 6))) (alias outer 1 1 (type (;8;))) (export (;9;) "pollable" (type (eq 8))) (type (;10;) (variant (case "get") (case "head") (case "post") (case "put") (case "delete") (case "connect") (case "options") (case "trace") (case "patch") (case "other" string))) (export (;11;) "method" (type (eq 10))) (type (;12;) (variant (case "HTTP") (case "HTTPS") (case "other" string))) (export (;13;) "scheme" (type (eq 12))) (type (;14;) (option string)) (type (;15;) (option u16)) (type (;16;) (record (field "rcode" 14) (field "info-code" 15))) (export (;17;) "DNS-error-payload" (type (eq 16))) (type (;18;) (option u8)) (type (;19;) (record (field "alert-id" 18) (field "alert-message" 14))) (export (;20;) "TLS-alert-received-payload" (type (eq 19))) (type (;21;) (option u32)) (type (;22;) (record (field "field-name" 14) (field "field-size" 21))) (export (;23;) "field-size-payload" (type (eq 22))) (type (;24;) (option u64)) (type (;25;) (option 23)) (type (;26;) (variant (case "DNS-timeout") (case "DNS-error" 17) (case "destination-not-found") (case "destination-unavailable") (case "destination-IP-prohibited") (case "destination-IP-unroutable") (case "connection-refused") (case "connection-terminated") (case "connection-timeout") (case "connection-read-timeout") (case "connection-write-timeout") (case "connection-limit-reached") (case "TLS-protocol-error") (case "TLS-certificate-error") (case "TLS-alert-received" 20) (case "HTTP-request-denied") (case "HTTP-request-length-required") (case "HTTP-request-body-size" 24) (case "HTTP-request-method-invalid") (case "HTTP-request-URI-invalid") (case "HTTP-request-URI-too-long") (case "HTTP-request-header-section-size" 21) (case "HTTP-request-header-size" 25) (case "HTTP-request-trailer-section-size" 21) (case "HTTP-request-trailer-size" 23) (case "HTTP-response-incomplete") (case "HTTP-response-header-section-size" 21) (case "HTTP-response-header-size" 23) (case "HTTP-response-body-size" 24) (case "HTTP-response-trailer-section-size" 21) (case "HTTP-response-trailer-size" 23) (case "HTTP-response-transfer-coding" 14) (case "HTTP-response-content-coding" 14) (case "HTTP-response-timeout") (case "HTTP-upgrade-failed") (case "HTTP-protocol-error") (case "loop-detected") (case "configuration-error") (case "internal-error" 14))) (export (;27;) "error-code" (type (eq 26))) (type (;28;) (variant (case "invalid-syntax") (case "forbidden") (case "immutable"))) (export (;29;) "header-error" (type (eq 28))) (type (;30;) string) (export (;31;) "field-key" (type (eq 30))) (type (;32;) (list u8)) (export (;33;) "field-value" (type (eq 32))) (export (;34;) "fields" (type (sub resource))) (export (;35;) "headers" (type (eq 34))) (export (;36;) "trailers" (type (eq 34))) (export (;37;) "incoming-request" (type (sub resource))) (export (;38;) "outgoing-request" (type (sub resource))) (export (;39;) "request-options" (type (sub resource))) (export (;40;) "response-outparam" (type (sub resource))) (type (;41;) u16) (export (;42;) "status-code" (type (eq 41))) (export (;43;) "incoming-response" (type (sub resource))) (export (;44;) "incoming-body" (type (sub resource))) (export (;45;) "future-trailers" (type (sub resource))) (export (;46;) "outgoing-response" (type (sub resource))) (export (;47;) "outgoing-body" (type (sub resource))) (export (;48;) "future-incoming-response" (type (sub resource))) ) ) (import "wasi:http/types@0.2.0-rc-2023-12-05" (instance (;4;) (type 9))) (alias export 4 "outgoing-request" (type (;10;))) (alias export 4 "request-options" (type (;11;))) (alias export 4 "future-incoming-response" (type (;12;))) (alias export 4 "error-code" (type (;13;))) (type (;14;) (instance (alias outer 1 10 (type (;0;))) (export (;1;) "outgoing-request" (type (eq 0))) (alias outer 1 11 (type (;2;))) (export (;3;) "request-options" (type (eq 2))) (alias outer 1 12 (type (;4;))) (export (;5;) "future-incoming-response" (type (eq 4))) (alias outer 1 13 (type (;6;))) (export (;7;) "error-code" (type (eq 6))) (type (;8;) (own 1)) (type (;9;) (own 3)) (type (;10;) (option 9)) (type (;11;) (own 5)) (type (;12;) (result 11 (error 7))) (type (;13;) (func (param "request" 8) (param "options" 10) (result 12))) (export (;0;) "handle" (func (type 13))) ) ) (export (;5;) "wasi:http/outgoing-handler@0.2.0-rc-2023-12-05" (instance (type 14))) ) ) (export (;5;) "outgoing-handler" (type 4)) (type (;6;) (component (type (;0;) (component (type (;0;) (instance (type (;0;) (list u8)) (type (;1;) (func (param "len" u64) (result 0))) (export (;0;) "get-random-bytes" (func (type 1))) (type (;2;) (func (result u64))) (export (;1;) "get-random-u64" (func (type 2))) ) ) (import "wasi:random/random@0.2.0-rc-2023-11-10" (instance (;0;) (type 0))) (type (;1;) (instance (export (;0;) "error" (type (sub resource))) (type (;1;) (borrow 0)) (type (;2;) (func (param "self" 1) (result string))) (export (;0;) "[method]error.to-debug-string" (func (type 2))) ) ) (import "wasi:io/error@0.2.0-rc-2023-11-10" (instance (;1;) (type 1))) (type (;2;) (instance (export (;0;) "pollable" (type (sub resource))) (type (;1;) (borrow 0)) (type (;2;) (func (param "self" 1) (result bool))) (export (;0;) "[method]pollable.ready" (func (type 2))) (type (;3;) (func (param "self" 1))) (export (;1;) "[method]pollable.block" (func (type 3))) (type (;4;) (list 1)) (type (;5;) (list u32)) (type (;6;) (func (param "in" 4) (result 5))) (export (;2;) "poll" (func (type 6))) ) ) (import "wasi:io/poll@0.2.0-rc-2023-11-10" (instance (;2;) (type 2))) (alias export 1 "error" (type (;3;))) (alias export 2 "pollable" (type (;4;))) (type (;5;) (instance (alias outer 1 3 (type (;0;))) (export (;1;) "error" (type (eq 0))) (alias outer 1 4 (type (;2;))) (export (;3;) "pollable" (type (eq 2))) (type (;4;) (own 1)) (type (;5;) (variant (case "last-operation-failed" 4) (case "closed"))) (export (;6;) "stream-error" (type (eq 5))) (export (;7;) "input-stream" (type (sub resource))) (export (;8;) "output-stream" (type (sub resource))) (type (;9;) (borrow 7)) (type (;10;) (list u8)) (type (;11;) (result 10 (error 6))) (type (;12;) (func (param "self" 9) (param "len" u64) (result 11))) (export (;0;) "[method]input-stream.read" (func (type 12))) (export (;1;) "[method]input-stream.blocking-read" (func (type 12))) (type (;13;) (result u64 (error 6))) (type (;14;) (func (param "self" 9) (param "len" u64) (result 13))) (export (;2;) "[method]input-stream.skip" (func (type 14))) (export (;3;) "[method]input-stream.blocking-skip" (func (type 14))) (type (;15;) (own 3)) (type (;16;) (func (param "self" 9) (result 15))) (export (;4;) "[method]input-stream.subscribe" (func (type 16))) (type (;17;) (borrow 8)) (type (;18;) (func (param "self" 17) (result 13))) (export (;5;) "[method]output-stream.check-write" (func (type 18))) (type (;19;) (result (error 6))) (type (;20;) (func (param "self" 17) (param "contents" 10) (result 19))) (export (;6;) "[method]output-stream.write" (func (type 20))) (export (;7;) "[method]output-stream.blocking-write-and-flush" (func (type 20))) (type (;21;) (func (param "self" 17) (result 19))) (export (;8;) "[method]output-stream.flush" (func (type 21))) (export (;9;) "[method]output-stream.blocking-flush" (func (type 21))) (type (;22;) (func (param "self" 17) (result 15))) (export (;10;) "[method]output-stream.subscribe" (func (type 22))) (type (;23;) (func (param "self" 17) (param "len" u64) (result 19))) (export (;11;) "[method]output-stream.write-zeroes" (func (type 23))) (export (;12;) "[method]output-stream.blocking-write-zeroes-and-flush" (func (type 23))) (type (;24;) (func (param "self" 17) (param "src" 9) (param "len" u64) (result 13))) (export (;13;) "[method]output-stream.splice" (func (type 24))) (export (;14;) "[method]output-stream.blocking-splice" (func (type 24))) ) ) (import "wasi:io/streams@0.2.0-rc-2023-11-10" (instance (;3;) (type 5))) (alias export 3 "output-stream" (type (;6;))) (type (;7;) (instance (alias outer 1 6 (type (;0;))) (export (;1;) "output-stream" (type (eq 0))) (type (;2;) (own 1)) (type (;3;) (func (result 2))) (export (;0;) "get-stdout" (func (type 3))) ) ) (import "wasi:cli/stdout@0.2.0-rc-2023-12-05" (instance (;4;) (type 7))) (type (;8;) (instance (alias outer 1 6 (type (;0;))) (export (;1;) "output-stream" (type (eq 0))) (type (;2;) (own 1)) (type (;3;) (func (result 2))) (export (;0;) "get-stderr" (func (type 3))) ) ) (import "wasi:cli/stderr@0.2.0-rc-2023-12-05" (instance (;5;) (type 8))) (alias export 3 "input-stream" (type (;9;))) (type (;10;) (instance (alias outer 1 9 (type (;0;))) (export (;1;) "input-stream" (type (eq 0))) (type (;2;) (own 1)) (type (;3;) (func (result 2))) (export (;0;) "get-stdin" (func (type 3))) ) ) (import "wasi:cli/stdin@0.2.0-rc-2023-12-05" (instance (;6;) (type 10))) (type (;11;) (instance (alias outer 1 4 (type (;0;))) (export (;1;) "pollable" (type (eq 0))) (type (;2;) u64) (export (;3;) "instant" (type (eq 2))) (type (;4;) u64) (export (;5;) "duration" (type (eq 4))) (type (;6;) (func (result 3))) (export (;0;) "now" (func (type 6))) (type (;7;) (func (result 5))) (export (;1;) "resolution" (func (type 7))) (type (;8;) (own 1)) (type (;9;) (func (param "when" 3) (result 8))) (export (;2;) "subscribe-instant" (func (type 9))) (type (;10;) (func (param "when" 5) (result 8))) (export (;3;) "subscribe-duration" (func (type 10))) ) ) (import "wasi:clocks/monotonic-clock@0.2.0-rc-2023-11-10" (instance (;7;) (type 11))) (alias export 7 "duration" (type (;12;))) (type (;13;) (instance (alias outer 1 12 (type (;0;))) (export (;1;) "duration" (type (eq 0))) (alias outer 1 9 (type (;2;))) (export (;3;) "input-stream" (type (eq 2))) (alias outer 1 6 (type (;4;))) (export (;5;) "output-stream" (type (eq 4))) (alias outer 1 3 (type (;6;))) (export (;7;) "io-error" (type (eq 6))) (alias outer 1 4 (type (;8;))) (export (;9;) "pollable" (type (eq 8))) (type (;10;) (variant (case "get") (case "head") (case "post") (case "put") (case "delete") (case "connect") (case "options") (case "trace") (case "patch") (case "other" string))) (export (;11;) "method" (type (eq 10))) (type (;12;) (variant (case "HTTP") (case "HTTPS") (case "other" string))) (export (;13;) "scheme" (type (eq 12))) (type (;14;) (option string)) (type (;15;) (option u16)) (type (;16;) (record (field "rcode" 14) (field "info-code" 15))) (export (;17;) "DNS-error-payload" (type (eq 16))) (type (;18;) (option u8)) (type (;19;) (record (field "alert-id" 18) (field "alert-message" 14))) (export (;20;) "TLS-alert-received-payload" (type (eq 19))) (type (;21;) (option u32)) (type (;22;) (record (field "field-name" 14) (field "field-size" 21))) (export (;23;) "field-size-payload" (type (eq 22))) (type (;24;) (option u64)) (type (;25;) (option 23)) (type (;26;) (variant (case "DNS-timeout") (case "DNS-error" 17) (case "destination-not-found") (case "destination-unavailable") (case "destination-IP-prohibited") (case "destination-IP-unroutable") (case "connection-refused") (case "connection-terminated") (case "connection-timeout") (case "connection-read-timeout") (case "connection-write-timeout") (case "connection-limit-reached") (case "TLS-protocol-error") (case "TLS-certificate-error") (case "TLS-alert-received" 20) (case "HTTP-request-denied") (case "HTTP-request-length-required") (case "HTTP-request-body-size" 24) (case "HTTP-request-method-invalid") (case "HTTP-request-URI-invalid") (case "HTTP-request-URI-too-long") (case "HTTP-request-header-section-size" 21) (case "HTTP-request-header-size" 25) (case "HTTP-request-trailer-section-size" 21) (case "HTTP-request-trailer-size" 23) (case "HTTP-response-incomplete") (case "HTTP-response-header-section-size" 21) (case "HTTP-response-header-size" 23) (case "HTTP-response-body-size" 24) (case "HTTP-response-trailer-section-size" 21) (case "HTTP-response-trailer-size" 23) (case "HTTP-response-transfer-coding" 14) (case "HTTP-response-content-coding" 14) (case "HTTP-response-timeout") (case "HTTP-upgrade-failed") (case "HTTP-protocol-error") (case "loop-detected") (case "configuration-error") (case "internal-error" 14))) (export (;27;) "error-code" (type (eq 26))) (type (;28;) (variant (case "invalid-syntax") (case "forbidden") (case "immutable"))) (export (;29;) "header-error" (type (eq 28))) (type (;30;) string) (export (;31;) "field-key" (type (eq 30))) (type (;32;) (list u8)) (export (;33;) "field-value" (type (eq 32))) (export (;34;) "fields" (type (sub resource))) (export (;35;) "headers" (type (eq 34))) (export (;36;) "trailers" (type (eq 34))) (export (;37;) "incoming-request" (type (sub resource))) (export (;38;) "outgoing-request" (type (sub resource))) (export (;39;) "request-options" (type (sub resource))) (export (;40;) "response-outparam" (type (sub resource))) (type (;41;) u16) (export (;42;) "status-code" (type (eq 41))) (export (;43;) "incoming-response" (type (sub resource))) (export (;44;) "incoming-body" (type (sub resource))) (export (;45;) "future-trailers" (type (sub resource))) (export (;46;) "outgoing-response" (type (sub resource))) (export (;47;) "outgoing-body" (type (sub resource))) (export (;48;) "future-incoming-response" (type (sub resource))) (type (;49;) (own 34)) (type (;50;) (func (result 49))) (export (;0;) "[constructor]fields" (func (type 50))) (type (;51;) (tuple 31 33)) (type (;52;) (list 51)) (type (;53;) (result 49 (error 29))) (type (;54;) (func (param "entries" 52) (result 53))) (export (;1;) "[static]fields.from-list" (func (type 54))) (type (;55;) (borrow 34)) (type (;56;) (list 33)) (type (;57;) (func (param "self" 55) (param "name" 31) (result 56))) (export (;2;) "[method]fields.get" (func (type 57))) (type (;58;) (func (param "self" 55) (param "name" 31) (result bool))) (export (;3;) "[method]fields.has" (func (type 58))) (type (;59;) (result (error 29))) (type (;60;) (func (param "self" 55) (param "name" 31) (param "value" 56) (result 59))) (export (;4;) "[method]fields.set" (func (type 60))) (type (;61;) (func (param "self" 55) (param "name" 31) (result 59))) (export (;5;) "[method]fields.delete" (func (type 61))) (type (;62;) (func (param "self" 55) (param "name" 31) (param "value" 33) (result 59))) (export (;6;) "[method]fields.append" (func (type 62))) (type (;63;) (func (param "self" 55) (result 52))) (export (;7;) "[method]fields.entries" (func (type 63))) (type (;64;) (func (param "self" 55) (result 49))) (export (;8;) "[method]fields.clone" (func (type 64))) (type (;65;) (borrow 37)) (type (;66;) (func (param "self" 65) (result 11))) (export (;9;) "[method]incoming-request.method" (func (type 66))) (type (;67;) (func (param "self" 65) (result 14))) (export (;10;) "[method]incoming-request.path-with-query" (func (type 67))) (type (;68;) (option 13)) (type (;69;) (func (param "self" 65) (result 68))) (export (;11;) "[method]incoming-request.scheme" (func (type 69))) (export (;12;) "[method]incoming-request.authority" (func (type 67))) (type (;70;) (own 35)) (type (;71;) (func (param "self" 65) (result 70))) (export (;13;) "[method]incoming-request.headers" (func (type 71))) (type (;72;) (own 44)) (type (;73;) (result 72)) (type (;74;) (func (param "self" 65) (result 73))) (export (;14;) "[method]incoming-request.consume" (func (type 74))) (type (;75;) (own 38)) (type (;76;) (func (param "headers" 70) (result 75))) (export (;15;) "[constructor]outgoing-request" (func (type 76))) (type (;77;) (borrow 38)) (type (;78;) (own 47)) (type (;79;) (result 78)) (type (;80;) (func (param "self" 77) (result 79))) (export (;16;) "[method]outgoing-request.body" (func (type 80))) (type (;81;) (func (param "self" 77) (result 11))) (export (;17;) "[method]outgoing-request.method" (func (type 81))) (type (;82;) (result)) (type (;83;) (func (param "self" 77) (param "method" 11) (result 82))) (export (;18;) "[method]outgoing-request.set-method" (func (type 83))) (type (;84;) (func (param "self" 77) (result 14))) (export (;19;) "[method]outgoing-request.path-with-query" (func (type 84))) (type (;85;) (func (param "self" 77) (param "path-with-query" 14) (result 82))) (export (;20;) "[method]outgoing-request.set-path-with-query" (func (type 85))) (type (;86;) (func (param "self" 77) (result 68))) (export (;21;) "[method]outgoing-request.scheme" (func (type 86))) (type (;87;) (func (param "self" 77) (param "scheme" 68) (result 82))) (export (;22;) "[method]outgoing-request.set-scheme" (func (type 87))) (export (;23;) "[method]outgoing-request.authority" (func (type 84))) (type (;88;) (func (param "self" 77) (param "authority" 14) (result 82))) (export (;24;) "[method]outgoing-request.set-authority" (func (type 88))) (type (;89;) (func (param "self" 77) (result 70))) (export (;25;) "[method]outgoing-request.headers" (func (type 89))) (type (;90;) (own 39)) (type (;91;) (func (result 90))) (export (;26;) "[constructor]request-options" (func (type 91))) (type (;92;) (borrow 39)) (type (;93;) (option 1)) (type (;94;) (func (param "self" 92) (result 93))) (export (;27;) "[method]request-options.connect-timeout" (func (type 94))) (type (;95;) (func (param "self" 92) (param "duration" 93) (result 82))) (export (;28;) "[method]request-options.set-connect-timeout" (func (type 95))) (export (;29;) "[method]request-options.first-byte-timeout" (func (type 94))) (export (;30;) "[method]request-options.set-first-byte-timeout" (func (type 95))) (export (;31;) "[method]request-options.between-bytes-timeout" (func (type 94))) (export (;32;) "[method]request-options.set-between-bytes-timeout" (func (type 95))) (type (;96;) (own 40)) (type (;97;) (own 46)) (type (;98;) (result 97 (error 27))) (type (;99;) (func (param "param" 96) (param "response" 98))) (export (;33;) "[static]response-outparam.set" (func (type 99))) (type (;100;) (borrow 43)) (type (;101;) (func (param "self" 100) (result 42))) (export (;34;) "[method]incoming-response.status" (func (type 101))) (type (;102;) (func (param "self" 100) (result 70))) (export (;35;) "[method]incoming-response.headers" (func (type 102))) (type (;103;) (func (param "self" 100) (result 73))) (export (;36;) "[method]incoming-response.consume" (func (type 103))) (type (;104;) (borrow 44)) (type (;105;) (own 3)) (type (;106;) (result 105)) (type (;107;) (func (param "self" 104) (result 106))) (export (;37;) "[method]incoming-body.stream" (func (type 107))) (type (;108;) (own 45)) (type (;109;) (func (param "this" 72) (result 108))) (export (;38;) "[static]incoming-body.finish" (func (type 109))) (type (;110;) (borrow 45)) (type (;111;) (own 9)) (type (;112;) (func (param "self" 110) (result 111))) (export (;39;) "[method]future-trailers.subscribe" (func (type 112))) (type (;113;) (own 36)) (type (;114;) (option 113)) (type (;115;) (result 114 (error 27))) (type (;116;) (result 115)) (type (;117;) (option 116)) (type (;118;) (func (param "self" 110) (result 117))) (export (;40;) "[method]future-trailers.get" (func (type 118))) (type (;119;) (func (param "headers" 70) (result 97))) (export (;41;) "[constructor]outgoing-response" (func (type 119))) (type (;120;) (borrow 46)) (type (;121;) (func (param "self" 120) (result 42))) (export (;42;) "[method]outgoing-response.status-code" (func (type 121))) (type (;122;) (func (param "self" 120) (param "status-code" 42) (result 82))) (export (;43;) "[method]outgoing-response.set-status-code" (func (type 122))) (type (;123;) (func (param "self" 120) (result 70))) (export (;44;) "[method]outgoing-response.headers" (func (type 123))) (type (;124;) (func (param "self" 120) (result 79))) (export (;45;) "[method]outgoing-response.body" (func (type 124))) (type (;125;) (borrow 47)) (type (;126;) (own 5)) (type (;127;) (result 126)) (type (;128;) (func (param "self" 125) (result 127))) (export (;46;) "[method]outgoing-body.write" (func (type 128))) (type (;129;) (result (error 27))) (type (;130;) (func (param "this" 78) (param "trailers" 114) (result 129))) (export (;47;) "[static]outgoing-body.finish" (func (type 130))) (type (;131;) (borrow 48)) (type (;132;) (func (param "self" 131) (result 111))) (export (;48;) "[method]future-incoming-response.subscribe" (func (type 132))) (type (;133;) (own 43)) (type (;134;) (result 133 (error 27))) (type (;135;) (result 134)) (type (;136;) (option 135)) (type (;137;) (func (param "self" 131) (result 136))) (export (;49;) "[method]future-incoming-response.get" (func (type 137))) (type (;138;) (borrow 7)) (type (;139;) (option 27)) (type (;140;) (func (param "err" 138) (result 139))) (export (;50;) "http-error-code" (func (type 140))) ) ) (import "wasi:http/types@0.2.0-rc-2023-12-05" (instance (;8;) (type 13))) (alias export 8 "outgoing-request" (type (;14;))) (alias export 8 "request-options" (type (;15;))) (alias export 8 "future-incoming-response" (type (;16;))) (alias export 8 "error-code" (type (;17;))) (type (;18;) (instance (alias outer 1 14 (type (;0;))) (export (;1;) "outgoing-request" (type (eq 0))) (alias outer 1 15 (type (;2;))) (export (;3;) "request-options" (type (eq 2))) (alias outer 1 16 (type (;4;))) (export (;5;) "future-incoming-response" (type (eq 4))) (alias outer 1 17 (type (;6;))) (export (;7;) "error-code" (type (eq 6))) (type (;8;) (own 1)) (type (;9;) (own 3)) (type (;10;) (option 9)) (type (;11;) (own 5)) (type (;12;) (result 11 (error 7))) (type (;13;) (func (param "request" 8) (param "options" 10) (result 12))) (export (;0;) "handle" (func (type 13))) ) ) (import "wasi:http/outgoing-handler@0.2.0-rc-2023-12-05" (instance (;9;) (type 18))) (type (;19;) (instance (type (;0;) (record (field "seconds" u64) (field "nanoseconds" u32))) (export (;1;) "datetime" (type (eq 0))) (type (;2;) (func (result 1))) (export (;0;) "now" (func (type 2))) (export (;1;) "resolution" (func (type 2))) ) ) (import "wasi:clocks/wall-clock@0.2.0-rc-2023-11-10" (instance (;10;) (type 19))) (alias export 8 "incoming-request" (type (;20;))) (alias export 8 "response-outparam" (type (;21;))) (type (;22;) (instance (alias outer 1 20 (type (;0;))) (export (;1;) "incoming-request" (type (eq 0))) (alias outer 1 21 (type (;2;))) (export (;3;) "response-outparam" (type (eq 2))) (type (;4;) (own 1)) (type (;5;) (own 3)) (type (;6;) (func (param "request" 4) (param "response-out" 5))) (export (;0;) "handle" (func (type 6))) ) ) (export (;11;) "wasi:http/incoming-handler@0.2.0-rc-2023-12-05" (instance (type 22))) ) ) (export (;0;) "wasi:http/proxy@0.2.0-rc-2023-12-05" (component (type 0))) ) ) (export (;7;) "proxy" (type 6)) (@custom "package-docs" "\00{\22worlds\22:{\22proxy\22:{\22docs\22:\22The `wasi:http/proxy` world captures a widely-implementable intersection of\5cnhosts that includes HTTP forward and reverse proxies. Components targeting\5cnthis world may concurrently stream in and out any number of incoming and\5cnoutgoing HTTP requests.\22}},\22interfaces\22:{\22types\22:{\22docs\22:\22This interface defines all of the types and methods for implementing\5cnHTTP Requests and Responses, both incoming and outgoing, as well as\5cntheir headers, trailers, and bodies.\22,\22funcs\22:{\22http-error-code\22:\22Attempts to extract a http-related `error` from the wasi:io `error`\5cnprovided.\5cn\5cnStream operations which return\5cn`wasi:io/stream/stream-error::last-operation-failed` have a payload of\5cntype `wasi:io/error/error` with more information about the operation\5cnthat failed. This payload can be passed through to this function to see\5cnif there's http-related information about the error to return.\5cn\5cnNote that this function is fallible because not all io-errors are\5cnhttp-related errors.\22,\22[constructor]fields\22:\22Construct an empty HTTP Fields.\5cn\5cnThe resulting `fields` is mutable.\22,\22[static]fields.from-list\22:\22Construct an HTTP Fields.\5cn\5cnThe resulting `fields` is mutable.\5cn\5cnThe list represents each key-value pair in the Fields. Keys\5cnwhich have multiple values are represented by multiple entries in this\5cnlist with the same key.\5cn\5cnThe tuple is a pair of the field key, represented as a string, and\5cnValue, represented as a list of bytes. In a valid Fields, all keys\5cnand values are valid UTF-8 strings. However, values are not always\5cnwell-formed, so they are represented as a raw list of bytes.\5cn\5cnAn error result will be returned if any header or value was\5cnsyntactically invalid, or if a header was forbidden.\22,\22[method]fields.get\22:\22Get all of the values corresponding to a key. If the key is not present\5cnin this `fields`, an empty list is returned. However, if the key is\5cnpresent but empty, this is represented by a list with one or more\5cnempty field-values present.\22,\22[method]fields.has\22:\22Returns `true` when the key is present in this `fields`. If the key is\5cnsyntactically invalid, `false` is returned.\22,\22[method]fields.set\22:\22Set all of the values for a key. Clears any existing values for that\5cnkey, if they have been set.\5cn\5cnFails with `header-error.immutable` if the `fields` are immutable.\22,\22[method]fields.delete\22:\22Delete all values for a key. Does nothing if no values for the key\5cnexist.\5cn\5cnFails with `header-error.immutable` if the `fields` are immutable.\22,\22[method]fields.append\22:\22Append a value for a key. Does not change or delete any existing\5cnvalues for that key.\5cn\5cnFails with `header-error.immutable` if the `fields` are immutable.\22,\22[method]fields.entries\22:\22Retrieve the full set of keys and values in the Fields. Like the\5cnconstructor, the list represents each key-value pair.\5cn\5cnThe outer list represents each key-value pair in the Fields. Keys\5cnwhich have multiple values are represented by multiple entries in this\5cnlist with the same key.\22,\22[method]fields.clone\22:\22Make a deep copy of the Fields. Equivelant in behavior to calling the\5cn`fields` constructor on the return value of `entries`. The resulting\5cn`fields` is mutable.\22,\22[method]incoming-request.method\22:\22Returns the method of the incoming request.\22,\22[method]incoming-request.path-with-query\22:\22Returns the path with query parameters from the request, as a string.\22,\22[method]incoming-request.scheme\22:\22Returns the protocol scheme from the request.\22,\22[method]incoming-request.authority\22:\22Returns the authority from the request, if it was present.\22,\22[method]incoming-request.headers\22:\22Get the `headers` associated with the request.\5cn\5cnThe returned `headers` resource is immutable: `set`, `append`, and\5cn`delete` operations will fail with `header-error.immutable`.\5cn\5cnThe `headers` returned are a child resource: it must be dropped before\5cnthe parent `incoming-request` is dropped. Dropping this\5cn`incoming-request` before all children are dropped will trap.\22,\22[method]incoming-request.consume\22:\22Gives the `incoming-body` associated with this request. Will only\5cnreturn success at most once, and subsequent calls will return error.\22,\22[constructor]outgoing-request\22:\22Construct a new `outgoing-request` with a default `method` of `GET`, and\5cn`none` values for `path-with-query`, `scheme`, and `authority`.\5cn\5cn* `headers` is the HTTP Headers for the Request.\5cn\5cnIt is possible to construct, or manipulate with the accessor functions\5cnbelow, an `outgoing-request` with an invalid combination of `scheme`\5cnand `authority`, or `headers` which are not permitted to be sent.\5cnIt is the obligation of the `outgoing-handler.handle` implementation\5cnto reject invalid constructions of `outgoing-request`.\22,\22[method]outgoing-request.body\22:\22Returns the resource corresponding to the outgoing Body for this\5cnRequest.\5cn\5cnReturns success on the first call: the `outgoing-body` resource for\5cnthis `outgoing-request` can be retrieved at most once. Subsequent\5cncalls will return error.\22,\22[method]outgoing-request.method\22:\22Get the Method for the Request.\22,\22[method]outgoing-request.set-method\22:\22Set the Method for the Request. Fails if the string present in a\5cn`method.other` argument is not a syntactically valid method.\22,\22[method]outgoing-request.path-with-query\22:\22Get the combination of the HTTP Path and Query for the Request.\5cnWhen `none`, this represents an empty Path and empty Query.\22,\22[method]outgoing-request.set-path-with-query\22:\22Set the combination of the HTTP Path and Query for the Request.\5cnWhen `none`, this represents an empty Path and empty Query. Fails is the\5cnstring given is not a syntactically valid path and query uri component.\22,\22[method]outgoing-request.scheme\22:\22Get the HTTP Related Scheme for the Request. When `none`, the\5cnimplementation may choose an appropriate default scheme.\22,\22[method]outgoing-request.set-scheme\22:\22Set the HTTP Related Scheme for the Request. When `none`, the\5cnimplementation may choose an appropriate default scheme. Fails if the\5cnstring given is not a syntactically valid uri scheme.\22,\22[method]outgoing-request.authority\22:\22Get the HTTP Authority for the Request. A value of `none` may be used\5cnwith Related Schemes which do not require an Authority. The HTTP and\5cnHTTPS schemes always require an authority.\22,\22[method]outgoing-request.set-authority\22:\22Set the HTTP Authority for the Request. A value of `none` may be used\5cnwith Related Schemes which do not require an Authority. The HTTP and\5cnHTTPS schemes always require an authority. Fails if the string given is\5cnnot a syntactically valid uri authority.\22,\22[method]outgoing-request.headers\22:\22Get the headers associated with the Request.\5cn\5cnThe returned `headers` resource is immutable: `set`, `append`, and\5cn`delete` operations will fail with `header-error.immutable`.\5cn\5cnThis headers resource is a child: it must be dropped before the parent\5cn`outgoing-request` is dropped, or its ownership is transfered to\5cnanother component by e.g. `outgoing-handler.handle`.\22,\22[constructor]request-options\22:\22Construct a default `request-options` value.\22,\22[method]request-options.connect-timeout\22:\22The timeout for the initial connect to the HTTP Server.\22,\22[method]request-options.set-connect-timeout\22:\22Set the timeout for the initial connect to the HTTP Server. An error\5cnreturn value indicates that this timeout is not supported.\22,\22[method]request-options.first-byte-timeout\22:\22The timeout for receiving the first byte of the Response body.\22,\22[method]request-options.set-first-byte-timeout\22:\22Set the timeout for receiving the first byte of the Response body. An\5cnerror return value indicates that this timeout is not supported.\22,\22[method]request-options.between-bytes-timeout\22:\22The timeout for receiving subsequent chunks of bytes in the Response\5cnbody stream.\22,\22[method]request-options.set-between-bytes-timeout\22:\22Set the timeout for receiving subsequent chunks of bytes in the Response\5cnbody stream. An error return value indicates that this timeout is not\5cnsupported.\22,\22[static]response-outparam.set\22:\22Set the value of the `response-outparam` to either send a response,\5cnor indicate an error.\5cn\5cnThis method consumes the `response-outparam` to ensure that it is\5cncalled at most once. If it is never called, the implementation\5cnwill respond with an error.\5cn\5cnThe user may provide an `error` to `response` to allow the\5cnimplementation determine how to respond with an HTTP error response.\22,\22[method]incoming-response.status\22:\22Returns the status code from the incoming response.\22,\22[method]incoming-response.headers\22:\22Returns the headers from the incoming response.\5cn\5cnThe returned `headers` resource is immutable: `set`, `append`, and\5cn`delete` operations will fail with `header-error.immutable`.\5cn\5cnThis headers resource is a child: it must be dropped before the parent\5cn`incoming-response` is dropped.\22,\22[method]incoming-response.consume\22:\22Returns the incoming body. May be called at most once. Returns error\5cnif called additional times.\22,\22[method]incoming-body.stream\22:\22Returns the contents of the body, as a stream of bytes.\5cn\5cnReturns success on first call: the stream representing the contents\5cncan be retrieved at most once. Subsequent calls will return error.\5cn\5cnThe returned `input-stream` resource is a child: it must be dropped\5cnbefore the parent `incoming-body` is dropped, or consumed by\5cn`incoming-body.finish`.\5cn\5cnThis invariant ensures that the implementation can determine whether\5cnthe user is consuming the contents of the body, waiting on the\5cn`future-trailers` to be ready, or neither. This allows for network\5cnbackpressure is to be applied when the user is consuming the body,\5cnand for that backpressure to not inhibit delivery of the trailers if\5cnthe user does not read the entire body.\22,\22[static]incoming-body.finish\22:\22Takes ownership of `incoming-body`, and returns a `future-trailers`.\5cnThis function will trap if the `input-stream` child is still alive.\22,\22[method]future-trailers.subscribe\22:\22Returns a pollable which becomes ready when either the trailers have\5cnbeen received, or an error has occured. When this pollable is ready,\5cnthe `get` method will return `some`.\22,\22[method]future-trailers.get\22:\22Returns the contents of the trailers, or an error which occured,\5cnonce the future is ready.\5cn\5cnThe outer `option` represents future readiness. Users can wait on this\5cn`option` to become `some` using the `subscribe` method.\5cn\5cnThe outer `result` is used to retrieve the trailers or error at most\5cnonce. It will be success on the first call in which the outer option\5cnis `some`, and error on subsequent calls.\5cn\5cnThe inner `result` represents that either the HTTP Request or Response\5cnbody, as well as any trailers, were received successfully, or that an\5cnerror occured receiving them. The optional `trailers` indicates whether\5cnor not trailers were present in the body.\5cn\5cnWhen some `trailers` are returned by this method, the `trailers`\5cnresource is immutable, and a child. Use of the `set`, `append`, or\5cn`delete` methods will return an error, and the resource must be\5cndropped before the parent `future-trailers` is dropped.\22,\22[constructor]outgoing-response\22:\22Construct an `outgoing-response`, with a default `status-code` of `200`.\5cnIf a different `status-code` is needed, it must be set via the\5cn`set-status-code` method.\5cn\5cn* `headers` is the HTTP Headers for the Response.\22,\22[method]outgoing-response.status-code\22:\22Get the HTTP Status Code for the Response.\22,\22[method]outgoing-response.set-status-code\22:\22Set the HTTP Status Code for the Response. Fails if the status-code\5cngiven is not a valid http status code.\22,\22[method]outgoing-response.headers\22:\22Get the headers associated with the Request.\5cn\5cnThe returned `headers` resource is immutable: `set`, `append`, and\5cn`delete` operations will fail with `header-error.immutable`.\5cn\5cnThis headers resource is a child: it must be dropped before the parent\5cn`outgoing-request` is dropped, or its ownership is transfered to\5cnanother component by e.g. `outgoing-handler.handle`.\22,\22[method]outgoing-response.body\22:\22Returns the resource corresponding to the outgoing Body for this Response.\5cn\5cnReturns success on the first call: the `outgoing-body` resource for\5cnthis `outgoing-response` can be retrieved at most once. Subsequent\5cncalls will return error.\22,\22[method]outgoing-body.write\22:\22Returns a stream for writing the body contents.\5cn\5cnThe returned `output-stream` is a child resource: it must be dropped\5cnbefore the parent `outgoing-body` resource is dropped (or finished),\5cnotherwise the `outgoing-body` drop or `finish` will trap.\5cn\5cnReturns success on the first call: the `output-stream` resource for\5cnthis `outgoing-body` may be retrieved at most once. Subsequent calls\5cnwill return error.\22,\22[static]outgoing-body.finish\22:\22Finalize an outgoing body, optionally providing trailers. This must be\5cncalled to signal that the response is complete. If the `outgoing-body`\5cnis dropped without calling `outgoing-body.finalize`, the implementation\5cnshould treat the body as corrupted.\5cn\5cnFails if the body's `outgoing-request` or `outgoing-response` was\5cnconstructed with a Content-Length header, and the contents written\5cnto the body (via `write`) does not match the value given in the\5cnContent-Length.\22,\22[method]future-incoming-response.subscribe\22:\22Returns a pollable which becomes ready when either the Response has\5cnbeen received, or an error has occured. When this pollable is ready,\5cnthe `get` method will return `some`.\22,\22[method]future-incoming-response.get\22:\22Returns the incoming HTTP Response, or an error, once one is ready.\5cn\5cnThe outer `option` represents future readiness. Users can wait on this\5cn`option` to become `some` using the `subscribe` method.\5cn\5cnThe outer `result` is used to retrieve the response or error at most\5cnonce. It will be success on the first call in which the outer option\5cnis `some`, and error on subsequent calls.\5cn\5cnThe inner `result` represents that either the incoming HTTP Response\5cnstatus and headers have recieved successfully, or that an error\5cnoccured. Errors may also occur while consuming the response body,\5cnbut those will be reported by the `incoming-body` and its\5cn`output-stream` child.\22},\22types\22:{\22method\22:{\22docs\22:\22This type corresponds to HTTP standard Methods.\22},\22scheme\22:{\22docs\22:\22This type corresponds to HTTP standard Related Schemes.\22},\22DNS-error-payload\22:{\22docs\22:\22Defines the case payload type for `DNS-error` above:\22},\22TLS-alert-received-payload\22:{\22docs\22:\22Defines the case payload type for `TLS-alert-received` above:\22},\22field-size-payload\22:{\22docs\22:\22Defines the case payload type for `HTTP-response-{header,trailer}-size` above:\22},\22error-code\22:{\22docs\22:\22These cases are inspired by the IANA HTTP Proxy Error Types:\5cnhttps://www.iana.org/assignments/http-proxy-status/http-proxy-status.xhtml#table-http-proxy-error-types\22,\22items\22:{\22internal-error\22:\22This is a catch-all error for anything that doesn't fit cleanly into a\5cnmore specific case. It also includes an optional string for an\5cnunstructured description of the error. Users should not depend on the\5cnstring for diagnosing errors, as it's not required to be consistent\5cnbetween implementations.\22}},\22header-error\22:{\22docs\22:\22This type enumerates the different kinds of errors that may occur when\5cnsetting or appending to a `fields` resource.\22,\22items\22:{\22invalid-syntax\22:\22This error indicates that a `field-key` or `field-value` was\5cnsyntactically invalid when used with an operation that sets headers in a\5cn`fields`.\22,\22forbidden\22:\22This error indicates that a forbidden `field-key` was used when trying\5cnto set a header in a `fields`.\22,\22immutable\22:\22This error indicates that the operation on the `fields` was not\5cnpermitted because the fields are immutable.\22}},\22field-key\22:{\22docs\22:\22Field keys are always strings.\22},\22field-value\22:{\22docs\22:\22Field values should always be ASCII strings. However, in\5cnreality, HTTP implementations often have to interpret malformed values,\5cnso they are provided as a list of bytes.\22},\22fields\22:{\22docs\22:\22This following block defines the `fields` resource which corresponds to\5cnHTTP standard Fields. Fields are a common representation used for both\5cnHeaders and Trailers.\5cn\5cnA `fields` may be mutable or immutable. A `fields` created using the\5cnconstructor, `from-list`, or `clone` will be mutable, but a `fields`\5cnresource given by other means (including, but not limited to,\5cn`incoming-request.headers`, `outgoing-request.headers`) might be be\5cnimmutable. In an immutable fields, the `set`, `append`, and `delete`\5cnoperations will fail with `header-error.immutable`.\22},\22headers\22:{\22docs\22:\22Headers is an alias for Fields.\22},\22trailers\22:{\22docs\22:\22Trailers is an alias for Fields.\22},\22incoming-request\22:{\22docs\22:\22Represents an incoming HTTP Request.\22},\22outgoing-request\22:{\22docs\22:\22Represents an outgoing HTTP Request.\22},\22request-options\22:{\22docs\22:\22Parameters for making an HTTP Request. Each of these parameters is\5cncurrently an optional timeout applicable to the transport layer of the\5cnHTTP protocol.\5cn\5cnThese timeouts are separate from any the user may use to bound a\5cnblocking call to `wasi:io/poll.poll`.\22},\22response-outparam\22:{\22docs\22:\22Represents the ability to send an HTTP Response.\5cn\5cnThis resource is used by the `wasi:http/incoming-handler` interface to\5cnallow a Response to be sent corresponding to the Request provided as the\5cnother argument to `incoming-handler.handle`.\22},\22status-code\22:{\22docs\22:\22This type corresponds to the HTTP standard Status Code.\22},\22incoming-response\22:{\22docs\22:\22Represents an incoming HTTP Response.\22},\22incoming-body\22:{\22docs\22:\22Represents an incoming HTTP Request or Response's Body.\5cn\5cnA body has both its contents - a stream of bytes - and a (possibly\5cnempty) set of trailers, indicating that the full contents of the\5cnbody have been received. This resource represents the contents as\5cnan `input-stream` and the delivery of trailers as a `future-trailers`,\5cnand ensures that the user of this interface may only be consuming either\5cnthe body contents or waiting on trailers at any given time.\22},\22future-trailers\22:{\22docs\22:\22Represents a future which may eventaully return trailers, or an error.\5cn\5cnIn the case that the incoming HTTP Request or Response did not have any\5cntrailers, this future will resolve to the empty set of trailers once the\5cncomplete Request or Response body has been received.\22},\22outgoing-response\22:{\22docs\22:\22Represents an outgoing HTTP Response.\22},\22outgoing-body\22:{\22docs\22:\22Represents an outgoing HTTP Request or Response's Body.\5cn\5cnA body has both its contents - a stream of bytes - and a (possibly\5cnempty) set of trailers, inducating the full contents of the body\5cnhave been sent. This resource represents the contents as an\5cn`output-stream` child resource, and the completion of the body (with\5cnoptional trailers) with a static function that consumes the\5cn`outgoing-body` resource, and ensures that the user of this interface\5cnmay not write to the body contents after the body has been finished.\5cn\5cnIf the user code drops this resource, as opposed to calling the static\5cnmethod `finish`, the implementation should treat the body as incomplete,\5cnand that an error has occured. The implementation should propogate this\5cnerror to the HTTP protocol by whatever means it has available,\5cnincluding: corrupting the body on the wire, aborting the associated\5cnRequest, or sending a late status code for the Response.\22},\22future-incoming-response\22:{\22docs\22:\22Represents a future which may eventaully return an incoming HTTP\5cnResponse, or an error.\5cn\5cnThis resource is returned by the `wasi:http/outgoing-handler` interface to\5cnprovide the HTTP Response corresponding to the sent Request.\22}}},\22incoming-handler\22:{\22docs\22:\22This interface defines a handler of incoming HTTP Requests. It should\5cnbe exported by components which can respond to HTTP Requests.\22,\22funcs\22:{\22handle\22:\22This function is invoked with an incoming HTTP Request, and a resource\5cn`response-outparam` which provides the capability to reply with an HTTP\5cnResponse. The response is sent by calling the `response-outparam.set`\5cnmethod, which allows execution to continue after the response has been\5cnsent. This enables both streaming to the response body, and performing other\5cnwork.\5cn\5cnThe implementor of this function must write a response to the\5cn`response-outparam` before returning, or else the caller will respond\5cnwith an error on its behalf.\22}},\22outgoing-handler\22:{\22docs\22:\22This interface defines a handler of outgoing HTTP Requests. It should be\5cnimported by components which wish to make HTTP Requests.\22,\22funcs\22:{\22handle\22:\22This function is invoked with an outgoing HTTP Request, and it returns\5cna resource `future-incoming-response` which represents an HTTP Response\5cnwhich may arrive in the future.\5cn\5cnThe `options` argument accepts optional parameters for the HTTP\5cnprotocol's transport layer.\5cn\5cnThis function may return an error if the `outgoing-request` is invalid\5cnor not allowed to be made. Otherwise, protocol errors are reported\5cnthrough the `future-incoming-response`.\22}}}}") (@producers (processed-by "wit-component" "$CARGO_PKG_VERSION") ) )