初心者です。
get requestsを使って二つの下記のパラメータを使ってステータスコードで200を出したいのですがどうしてもうまくいきません。'requests' is not definedというところで引っかかるのですが、定義の方法がわからいところが問題かと思います。200(OK)を出したあとはJSONを使って同じ結果も得たいと思って、その下にはJSONコードを書いてあります。
条件
http://api.btc38.com/v1/depth.php
{'c': "bts", 'mk_type': "cny"}
入力
url = "http://api.btc38.com/v1/depth.php"
parameters = {'c': "bts", 'mk_type': "cny"}
response = requests.get("http://api.btc38.com/v1/depth.php")
json = request.get("http://api.btc38.com/v1/depth.php.json?c=bts&mk_type=c")
結果
Traceback (most recent call last):
File "<stdin>", line 4, in <module>
NameError: name 'requests' is not defined

回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/09/06 09:26