I hereby claim:
- I am jhuss on github.
- I am jhuss (https://keybase.io/jhuss) on keybase.
- I have a public key ASDPENMXAMRy8SC23xAu_uqVfk82rgDX_3-mVaoHIemRvAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
JSONDecodeError at /user/profile/credit_cards | |
Expecting value: line 1 column 1 (char 0) | |
Request Method: POST | |
Request URL: http://api.tembici.com.br/user/profile/credit_cards | |
Django Version: 2.0.13 | |
Python Executable: /opt/projects/venv/temapi/bin/python3 | |
Python Version: 3.5.2 | |
Python Path: ['/opt/projects/venv/temapi/bin', '/opt/projects/temapi', '/opt/projects/venv/temapi/lib/python35.zip', '/opt/projects/venv/temapi/lib/python3.5', '/opt/projects/venv/temapi/lib/python3.5/plat-x86_64-linux-gnu', '/opt/projects/venv/temapi/lib/python3.5/lib-dynload', '/usr/lib/python3.5', '/usr/lib/python3.5/plat-x86_64-linux-gnu', '/opt/projects/venv/temapi/lib/python3.5/site-packages', '/opt/projects/temapi'] | |
Server time: ******************** |
with file_io.open(mode='rb') as f: | |
encoded = base64.b64encode(f.read()) | |
file_base64 = encoded.decode() |
FROM ubuntu:xenial | |
ENV DEBIAN_FRONTEND=noninteractive | |
# Install basics | |
RUN apt-get update | |
RUN apt-get install -y locales | |
RUN locale-gen en_US.UTF-8 | |
ENV LANG en_US.UTF-8 |
from base64 import b64encode | |
from urllib2 import Request, urlopen | |
request = Request(url) | |
base64string = b64encode(b'{0}:{1}'.format(self.username_api, self.password_api)).decode("ascii") | |
request.add_header('Authorization', b'Basic {0}'.format(base64string)) | |
result = urlopen(request) |