//关闭文件句柄 fclose(file_stream); //保存参数 lr_save_string(readbuf,"bodys"); } Action() { lr_start_transaction("CreateObj_1M"); web_add_header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8.."); web_add_header("Content-Type", "text/plain; charset=UTF-8"); web_add_header("Authorization", "YWS {userkey}:XXXXXXX"); web_custom_request("CreateObj", "URL=http://smartstorage{id}.yoyoyws.com:38080/test00bucket00/{IterationNum}-10M", "Method=PUT", "TargetFrame=", "Resource=0", "RecContentType=application/xml", "Referer=", "Mode=HTML", "Body={bodys}", //如果是二进制文件,可以改成BodyBinary LAST ); returnCode = web_get_int_property(HTTP_INFO_RETURN_CODE); if ( returnCode!=201 ) { lr_end_transaction("CreateObj_1M",LR_FAIL); }else{ lr_end_transaction("CreateObj_1M",LR_PASS); } return 0; } |