-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move cookiejar change to the right place
InitHTTP overrides the default client created in the starlarkhttp module. And InitHTTP is called from the render and other commands. So, original commit would have had no effect, since that client isn't used in practice. This is where we need to add the cookie jar
- Loading branch information
1 parent
04f5edc
commit 8681f54
Showing
6 changed files
with
66 additions
and
57 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
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
load("http.star", "http") | ||
load("assert.star", "assert") | ||
load("render.star", "render") | ||
|
||
def main(): | ||
res_1 = http.post(test_server_url + "/login") | ||
assert.eq(res_1.status_code, 200) | ||
assert.eq(res_1.body(), '{"hello":"world"}') | ||
assert.eq(res_1.json(), {"hello": "world"}) | ||
return render.Root(child=render.Text("pass")) |