Extract RestConnector::buildRequest()
Ensure the parameter is a string before treating it like one