It just means it expects that as a key in your header data
import requests
endpoint = ".../api/ip"
data = {"ip": "1.1.2.3"}
headers = {"Authorization": "Bearer MYREALLYLONGTOKENIGOT"}
print(requests.post(endpoint, data=data, headers=headers).json())
More Related Contents:
- Execute curl command within a Python script
- SSL backend error when using OpenSSL
- Behavior of exec function in Python 2 and Python 3
- How do I create test and train samples from one dataframe with pandas?
- Dead simple example of using Multiprocessing Queue, Pool and Locking
- Python: URLError:
- Python: count repeated elements in the list [duplicate]
- Parse a tuple from a string?
- What is the difference between len() and sys.getsizeof() methods in python?
- Why does this not work as an array membership test? [duplicate]
- How to redirect stdout to both file and console with scripting?
- Why does Python’s multiprocessing module import __main__ when starting a new process on Windows?
- AttributeError: ‘datetime’ module has no attribute ‘strptime’
- When calling super() in a derived class, can I pass in self.__class__? [duplicate]
- Why can I pass an instance method to multiprocessing.Process, but not a multiprocessing.Pool?
- How to pass dictionary as command line argument to Python script?
- ImportError on python 3, worked fine on python 2.7
- How to get Windows short file name in python?
- How to plot a chart in the terminal
- How do I flatten a list of lists/nested lists? [duplicate]
- pip: cert failed, but curl works
- Read .doc file with python
- Making HTTP HEAD request with urllib2 from Python 2
- I want to multiply two columns in a pandas DataFrame and add the result into a new column
- What is different between makedirs and mkdir of os?
- Python list greater than number [duplicate]
- Catching exception in context manager __enter__()
- confused about random_state in decision tree of scikit learn
- Is possible to mapping view with class using mapper in SqlAlchemy?
- Python 2.7 : LookupError: unknown encoding: cp65001 [duplicate]