Commit aeec346b authored by J. Fernando Sánchez's avatar J. Fernando Sánchez
Browse files

Add content-type to requests in example

parent 9292a6bb
......@@ -13,11 +13,11 @@ eid = 0
with open(os.path.join(ROOT, 'blogPosting.txt'), 'r') as f:
for line in f:
url = 'http://{}/{}/{}/{}'.format(ENDPOINT, INDEX, "twitter", eid)
requests.put(url, data=line)
requests.put(url, data=line, headers={'Content-Type': 'application/json'})
eid += 1
with open(os.path.join(ROOT, 'comments-ld.txt'), 'r') as f:
for line in f:
url = 'http://{}/{}/{}/{}'.format(ENDPOINT, INDEX, "reddit", eid)
requests.put(url, data=line)
requests.put(url, data=line, headers={'Content-Type': 'application/json'})
eid += 1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment