CM API does not work well with HTTP connections,but socket works well.