lr http_post请求webservice

 

image

Action()
{
    web_reg_save_param("Response","LB=","RB=",LAST);
    web_submit_data("getWeather",
        "Action=http://webservice.webxml.com.cn/WebServices/WeatherWS.asmx/getWeather",
        "Method=POST",
        ITEMDATA,
        "Name=theCityCode", "Value=3409", ENDITEM,
        "Name=theUserID", "Value=", ENDITEM,
        LAST);

    lr_convert_string_encoding(lr_eval_string("{Response}"),LR_ENC_UTF8,LR_ENC_SYSTEM_LOCALE,"ResponseUTF8");
    lr_output_message("Response is : %s",lr_eval_string("{ResponseUTF8}"));

    return 0;
}

 

image

posted @ 2014-12-19 10:39  hotarubi  阅读(262)  评论(0编辑  收藏  举报