obspy.clients.seishub.client._EventMapperClient.put_resource

_EventMapperClient.put_resource(resource_name, xml_string, headers={})

PUTs a XML resource.

Parameters:
  • resource_name (str) Name of the resource.
  • headers (dict) Header information for request, e.g. {'User-Agent': "obspyck"}
  • xml_string (str) XML for a send request (PUT/POST)
Return type:

tuple

Returns:

(HTTP status code, HTTP status message)

Example

>>> c = Client()
>>> xseed_file = "dataless.seed.BW_UH1.xml"
>>> xml_str = open(xseed_file).read()  
>>> c.station.put_resource(xseed_file, xml_str)  
(201, 'OK')