use isJsonArray for testing response type

update to json_to_hashmap that uses the parsed content of the returning JSON to determine type rather than specifying it as a parameter.

restore post() and add put() to avoid breaking change for users of existing functions.