Sync apiclient from Oslo

Sync'ing apiclient from Oslo to fix the "'unicode' object has no attribute
'get'" problem.

Closes-Bug: #1386470
Change-Id: I46233c04a95c6441ae86572915f4492c6c1a48c5