diff --git a/apps/iot/src/http_handler/http_host_handler.erl b/apps/iot/src/http_handler/http_host_handler.erl index dea7b52..95779b6 100644 --- a/apps/iot/src/http_handler/http_host_handler.erl +++ b/apps/iot/src/http_handler/http_host_handler.erl @@ -76,9 +76,9 @@ handle_request("POST", "/host/publish_command", _, <<"t_id">> => integer_to_binary(TaskId), <<"t">> => Timeout, <<"ts">> => iot_util:current_time(), - <<"m">> => jiffy:encode(Params, [force_utf8]) + <<"m">> => iolist_to_binary(jiffy:encode(Params, [force_utf8])) }, - BinReply = jiffy:encode(append_service_name(PostParams, Reply), [force_utf8]), + BinReply = iolist_to_binary(jiffy:encode(append_service_name(PostParams, Reply), [force_utf8])), case iot_host:aes_encode(Pid, CommandType, BinReply) of {error, Reason} when is_binary(Reason) ->