@@ -216,10 +216,10 @@ interface types {
216
216
///
217
217
/// The names and values are always returned in the original casing and in
218
218
/// the order in which they will be serialized for transport.
219
- entries : func () -> list <tuple <field-name ,field-value >>;
219
+ copy-all : func () -> list <tuple <field-name ,field-value >>;
220
220
221
221
/// Make a deep copy of the Fields. Equivalent in behavior to calling the
222
- /// `fields` constructor on the return value of `entries ` . The resulting
222
+ /// `fields` constructor on the return value of `copy-all ` . The resulting
223
223
/// `fields` is mutable.
224
224
clone : func () -> fields ;
225
225
}
@@ -262,22 +262,22 @@ interface types {
262
262
) -> tuple <request , future <result <_ , error-code >>>;
263
263
264
264
/// Get the Method for the Request.
265
- method : func () -> method ;
265
+ get- method: func () -> method ;
266
266
/// Set the Method for the Request. Fails if the string present in a
267
267
/// `method.other` argument is not a syntactically valid method.
268
268
set-method : func (method : method ) -> result ;
269
269
270
270
/// Get the combination of the HTTP Path and Query for the Request. When
271
271
/// `none` , this represents an empty Path and empty Query.
272
- path-with-query : func () -> option <string >;
272
+ get- path-with-query: func () -> option <string >;
273
273
/// Set the combination of the HTTP Path and Query for the Request. When
274
274
/// `none` , this represents an empty Path and empty Query. Fails is the
275
275
/// string given is not a syntactically valid path and query uri component.
276
276
set-path-with-query : func (path-with-query : option <string >) -> result ;
277
277
278
278
/// Get the HTTP Related Scheme for the Request. When `none` , the
279
279
/// implementation may choose an appropriate default scheme.
280
- scheme : func () -> option <scheme >;
280
+ get- scheme: func () -> option <scheme >;
281
281
/// Set the HTTP Related Scheme for the Request. When `none` , the
282
282
/// implementation may choose an appropriate default scheme. Fails if the
283
283
/// string given is not a syntactically valid uri scheme.
@@ -286,7 +286,7 @@ interface types {
286
286
/// Get the authority of the Request's target URI. A value of `none` may be used
287
287
/// with Related Schemes which do not require an authority. The HTTP and
288
288
/// HTTPS schemes always require an authority.
289
- authority : func () -> option <string >;
289
+ get- authority: func () -> option <string >;
290
290
/// Set the authority of the Request's target URI. A value of `none` may be used
291
291
/// with Related Schemes which do not require an authority. The HTTP and
292
292
/// HTTPS schemes always require an authority. Fails if the string given is
@@ -301,19 +301,19 @@ interface types {
301
301
/// This `request-options` resource is a child: it must be dropped before
302
302
/// the parent `request` is dropped, or its ownership is transferred to
303
303
/// another component by e.g. `handler.handle` .
304
- options : func () -> option <request-options >;
304
+ get- options: func () -> option <request-options >;
305
305
306
306
/// Get the headers associated with the Request.
307
307
///
308
308
/// The returned `headers` resource is immutable: `set` , `append` , and
309
309
/// `delete` operations will fail with `header-error.immutable` .
310
- headers : func () -> headers ;
310
+ get- headers: func () -> headers ;
311
311
312
312
/// Get body of the Request.
313
313
///
314
314
/// Stream returned by this method represents the contents of the body.
315
- /// Once the stream is reported as closed, callers should await the returned future
316
- /// to determine whether the body was received successfully.
315
+ /// Once the stream is reported as closed, callers should await the returned
316
+ /// future to determine whether the body was received successfully.
317
317
/// The future will only resolve after the stream is reported as closed.
318
318
///
319
319
/// The stream and future returned by this method are children:
@@ -327,8 +327,9 @@ interface types {
327
327
/// - a stream or future returned by a previous call to this method is still open
328
328
/// - a stream returned by a previous call to this method has reported itself as closed
329
329
/// Thus there will always be at most one readable stream open for a given body.
330
- /// Each subsequent stream picks up where the last stream left off, up until it is finished.
331
- body : func () -> result <tuple <stream <u8 >, future <result <option <trailers >, error-code >>>>;
330
+ /// Each subsequent stream picks up where the previous one left off,
331
+ /// continuing until the entire body has been consumed.
332
+ consume-body : func () -> result <tuple <stream <u8 >, future <result <option <trailers >, error-code >>>>;
332
333
}
333
334
334
335
/// Parameters for making an HTTP Request. Each of these parameters is
@@ -342,15 +343,15 @@ interface types {
342
343
constructor ();
343
344
344
345
/// The timeout for the initial connect to the HTTP Server.
345
- connect-timeout : func () -> option <duration >;
346
+ get- connect-timeout: func () -> option <duration >;
346
347
347
348
/// Set the timeout for the initial connect to the HTTP Server. An error
348
349
/// return value indicates that this timeout is not supported or that this
349
350
/// handle is immutable.
350
351
set-connect-timeout : func (duration : option <duration >) -> result <_ , request-options-error >;
351
352
352
353
/// The timeout for receiving the first byte of the Response body.
353
- first-byte-timeout : func () -> option <duration >;
354
+ get- first-byte-timeout: func () -> option <duration >;
354
355
355
356
/// Set the timeout for receiving the first byte of the Response body. An
356
357
/// error return value indicates that this timeout is not supported or that
@@ -359,7 +360,7 @@ interface types {
359
360
360
361
/// The timeout for receiving subsequent chunks of bytes in the Response
361
362
/// body stream.
362
- between-bytes-timeout : func () -> option <duration >;
363
+ get- between-bytes-timeout: func () -> option <duration >;
363
364
364
365
/// Set the timeout for receiving subsequent chunks of bytes in the Response
365
366
/// body stream. An error return value indicates that this timeout is not
@@ -397,7 +398,7 @@ interface types {
397
398
) -> tuple <response , future <result <_ , error-code >>>;
398
399
399
400
/// Get the HTTP Status Code for the Response.
400
- status-code : func () -> status-code ;
401
+ get- status-code: func () -> status-code ;
401
402
402
403
/// Set the HTTP Status Code for the Response. Fails if the status-code
403
404
/// given is not a valid http status code.
@@ -407,13 +408,13 @@ interface types {
407
408
///
408
409
/// The returned `headers` resource is immutable: `set` , `append` , and
409
410
/// `delete` operations will fail with `header-error.immutable` .
410
- headers : func () -> headers ;
411
+ get- headers: func () -> headers ;
411
412
412
413
/// Get body of the Response.
413
414
///
414
415
/// Stream returned by this method represents the contents of the body.
415
- /// Once the stream is reported as closed, callers should await the returned future
416
- /// to determine whether the body was received successfully.
416
+ /// Once the stream is reported as closed, callers should await the returned
417
+ /// future to determine whether the body was received successfully.
417
418
/// The future will only resolve after the stream is reported as closed.
418
419
///
419
420
/// The stream and future returned by this method are children:
@@ -427,7 +428,8 @@ interface types {
427
428
/// - a stream or future returned by a previous call to this method is still open
428
429
/// - a stream returned by a previous call to this method has reported itself as closed
429
430
/// Thus there will always be at most one readable stream open for a given body.
430
- /// Each subsequent stream picks up where the last stream left off, up until it is finished.
431
- body : func () -> result <tuple <stream <u8 >, future <result <option <trailers >, error-code >>>>;
431
+ /// Each subsequent stream picks up where the previous one left off,
432
+ /// continuing until the entire body has been consumed.
433
+ consume-body : func () -> result <tuple <stream <u8 >, future <result <option <trailers >, error-code >>>>;
432
434
}
433
435
}
0 commit comments