Skip to content

Commit edddafd

Browse files
authored
Merge pull request #51 from pauperpythonistas/bugfix/GH-44/compatibility-with-geomark-api-4.1.2
Bugfix/gh 44/compatibility with geomark api 4.1.2
2 parents 6dc9448 + ace197e commit edddafd

20 files changed

Lines changed: 419 additions & 414 deletions

geomark/geomark.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
import json
23
import requests
34
# from six.moves.urllib.parse import urlparse
45

@@ -203,9 +204,9 @@ def _handle_get(response, **kwargs):
203204
def _handle_post(response, **kwargs):
204205
config = kwargs.get("config", _config)
205206
if response.ok:
206-
url = response.url
207+
content = json.loads(response.content.decode('utf-8'))
207208
response.close()
208-
return Geomark(geomarkUrl=url)
209+
return Geomark(geomarkId=content['id'])
209210
else:
210211
config.LOGGER.error("Server responded with: " + response.text)
211212
response.raise_for_status()

0 commit comments

Comments
 (0)