rest-core: Use TextMap, hackily