Protocols

http module

librair.protocols.http.get_request(url, headers={})

send http get request to given url with (optional) headers

librair.protocols.http.response_json(response)

get json data from http repsonse

librair.protocols.http.response_ok(response)
librair.protocols.http.response_text(response)

get text data from http repsonse

librair.protocols.http.response_xml(response)

get xml data from http repsonse

sru module

librair.protocols.sru.address(base, query, schema='mods', records=10, version='1.2', operation='searchRetrieve')

get http address for given parameters

librair.protocols.sru.explain(base, version)

return explanation page for given base and version

librair.protocols.sru.retrieve(url)

send request to given url and return xml response