YAPC::EU 2018 Glasgow Update!
This commit is contained in:
parent
22f33d4004
commit
4e2d22a71d
1170 changed files with 15042 additions and 3047 deletions
7
Task/HTTPS-Authenticated/Lua/https-authenticated.lua
Normal file
7
Task/HTTPS-Authenticated/Lua/https-authenticated.lua
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
local requests = require('requests')
|
||||
local auth = requests.HTTPBasicAuth('admin', 'admin')
|
||||
local resp, e = requests.get({
|
||||
url = 'https://httpbin.org/basic-auth/admin/admin',
|
||||
auth = auth
|
||||
})
|
||||
io.write(string.format('Status: %d', resp.status_code))
|
||||
9
Task/HTTPS-Authenticated/Phix/https-authenticated.phix
Normal file
9
Task/HTTPS-Authenticated/Phix/https-authenticated.phix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
include builtins\libcurl.e
|
||||
curl_global_init()
|
||||
atom curl = curl_easy_init()
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://user:password@example.com/")
|
||||
object res = curl_easy_perform_ex(curl)
|
||||
curl_easy_cleanup(curl)
|
||||
curl_global_cleanup()
|
||||
|
||||
puts(1,res)
|
||||
Loading…
Add table
Add a link
Reference in a new issue