-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1 parent
f09bc7a
commit 16a22f6
Showing
5 changed files
with
16 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,6 +88,7 @@ namespace net::http { | |
|
||
void method(WrenVM* vm); | ||
|
||
|
||
} | ||
|
||
namespace encoding { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,4 @@ | ||
foreign class Request { | ||
construct new(url) { | ||
this._headers = {} | ||
} | ||
|
||
headers {_headers} | ||
|
||
foreign method(method) | ||
|
||
|
||
[key]=(value) { | ||
this._headers[key] = value | ||
} | ||
|
||
[key] { | ||
return this._headers[key] | ||
} | ||
} | ||
|
||
|
||
|
||
foreign class Client { | ||
construct new(url) {} | ||
foreign method(m) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
import "std/net/http" for Request | ||
import "std/net/http" for Client | ||
|
||
var resp = Request.fetch("https://example.com/") | ||
System.print("%(resp)") | ||
Client.new("https://example.com") |