@@ -53,7 +53,7 @@ export default action(async () => {
53
53
fetchInitFormDataBody,
54
54
fetchInitFormDataBlobFilenameBody,
55
55
fetchInitFormDataTextFileBody,
56
- // fetchUserAgent,
56
+ fetchUserAgent,
57
57
// fetchRequest,
58
58
// fetchRequestAcceptHeaders,
59
59
// fetchPostBodyString,
@@ -642,15 +642,15 @@ async function fetchInitFormDataTextFileBody() {
642
642
assert . strictEqual ( await file . text ( ) , await resultFile . text ( ) ) ;
643
643
}
644
644
645
- // async function fetchUserAgent() {
646
- // const data = "Hello World";
647
- // const response = await fetch("http://localhost:4545/echo_server", {
648
- // method: "POST",
649
- // body: new TextEncoder().encode(data),
650
- // });
651
- // assertEquals (response.headers.get("user-agent"), `Deno/${Deno.version.deno} `);
652
- // await response.text();
653
- // }
645
+ async function fetchUserAgent ( ) {
646
+ const data = "Hello World" ;
647
+ const response = await fetch ( "http://localhost:4545/echo_server" , {
648
+ method : "POST" ,
649
+ body : new TextEncoder ( ) . encode ( data ) ,
650
+ } ) ;
651
+ assert . equal ( response . headers . get ( "user-agent" ) , `Convex/1.0 ` ) ;
652
+ await response . text ( ) ;
653
+ }
654
654
655
655
// function bufferServer(addr: string): Promise<Buffer> {
656
656
// const [hostname, port] = addr.split(":");
0 commit comments