Fixed cancel_order JSON parsing error

Reason:
  The server does not return JSON when the order is cancelled so an
  attempt to parse as JSON will throw a JSON parsing exception.
Change:
  an optional parameter was added (is_json) to the api_call method.
  the response will only be parsed as json if is_json is true