Hearthstone

無料
よって omgvamp | 更新済み 23 days ago | Entertainment
人気

9.7 / 10

レイテンシー

2,275ms

サービスレベル

100%

Health Check

N/A

すべてのディスカッションに戻る

Using python package requests instead of unirest?

Rapid account: Surrh
surrh
5 years ago

Can’t get unirest to install, and am much more comfortable using requests - but can’t figure out the code and keep getting error 401. Anyone have help/advice?

Rapid account: Surrh
surrh Commented 5 years ago

Figured it out!


url = 'https://omgvamp-hearthstone-v1.p.rapidapi.com/cards'

headers = {
    "X-RapidAPI-Host": "omgvamp-hearthstone-v1.p.rapidapi.com",
    "X-RapidAPI-Key": "5fae6438d6mshaa0d7ebd4370f4fp143cc0jsnea48f0c12b12"
}


response = requests.get(url, headers = headers)

response```

ディスカッションに参加しましょう-以下にコメントを追加してください:

ログイン/サインアップして新しいコメントを投稿