-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f116aa7
commit 94fd832
Showing
11 changed files
with
39 additions
and
18 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 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 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,31 +1,31 @@ | ||
import httpx | ||
|
||
async def get_url(url, **kwargs): | ||
async with httpx.AsyncClient(follow_redirects=True) as client: | ||
async with httpx.AsyncClient(follow_redirects=True, verify=False) as client: | ||
resp = await client.get(url, **kwargs) | ||
result = resp.text | ||
return result | ||
|
||
async def get_content(url, **kwargs): | ||
async with httpx.AsyncClient(follow_redirects=True) as client: | ||
async with httpx.AsyncClient(follow_redirects=True, verify=False) as client: | ||
resp = await client.get(url, **kwargs) | ||
result = resp.content | ||
return result | ||
|
||
async def get_status(url, **kwargs): | ||
async with httpx.AsyncClient(follow_redirects=True) as client: | ||
async with httpx.AsyncClient(follow_redirects=True, verify=False) as client: | ||
resp = await client.get(url, **kwargs) | ||
result = resp.status_code | ||
return result | ||
|
||
async def get_api(url, **kwargs): | ||
async with httpx.AsyncClient(follow_redirects=True) as client: | ||
async with httpx.AsyncClient(follow_redirects=True, verify=False) as client: | ||
resp = await client.get(url, **kwargs) | ||
result = resp.json() | ||
return result | ||
|
||
async def post_url(url, **kwargs): | ||
async with httpx.AsyncClient(follow_redirects=True) as client: | ||
async with httpx.AsyncClient(follow_redirects=True, verify=False) as client: | ||
resp = await client.post(url, **kwargs) | ||
result = resp.text | ||
return result |