Skip to content

Commit 82367cb

Browse files
committed
Fix hardcoded path in POST - breaks get_short_url
Closes #2
1 parent 74af83d commit 82367cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

quickchart/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def get_url(self):
3636
params['key'] = self.key
3737
return 'https://quickchart.io/chart?%s' % urlencode(params)
3838

39-
def _post(self, path):
39+
def _post(self, url):
4040
try:
4141
import requests
4242
except:
@@ -52,7 +52,7 @@ def _post(self, path):
5252
}
5353
if self.key:
5454
postdata['key'] = self.key
55-
resp = requests.post('https://quickchart.io/chart', json=postdata)
55+
resp = requests.post(url, json=postdata)
5656
if resp.status_code != 200:
5757
raise RuntimeError('Invalid response code from chart creation endpoint')
5858
return resp

0 commit comments

Comments
 (0)