-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix doc feedback issues for the HTTP client (#4034)
- Loading branch information
1 parent
69b09d5
commit 14909d2
Showing
2 changed files
with
43 additions
and
5 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
doc/code_snippets/test/http_client/default_client_get_test.lua
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,9 @@ | ||
local http_client = require('http.client') | ||
local response = http_client.get('https://httpbin.org/get') | ||
print('Status: '..response.status..' '.. response.reason) | ||
|
||
local luatest = require('luatest') | ||
local test_group = luatest.group() | ||
test_group.test_returns_status = function() | ||
luatest.assert_equals(response.status, 200) | ||
end |
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