首页 > 代码库 > lr http请求webservice-web_submit_data

lr http请求webservice-web_submit_data

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=http://www.mamicode.com/3409", ENDITEM,
        "Name=theUserID", "Value=http://www.mamicode.com/", 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

lr http请求webservice-web_submit_data