zoukankan      html  css  js  c++  java
  • Loadrunner三种post格式的请求

    Loadrunner三种post格式的请求
    1 web_custom_request
    intweb_custom_request(const char *RequestName, <List of Attributes>,
    [EXTRARES, <List of Resource Attributes>,] LAST ); 
    
     第一种:自定义http格式的请求,可以是任何的方式或是body如下:
    
    web_custom_request("xxxxx",
    
                                "URL=http://xxxx.xxxx.xxx",
    
                                "Method=POST",
    
                                "Resource=0",
    
                                "Snapshot=t10.inf",
    
                                "Mode=HTML",
    
                                "EncType=application/x-www-form-urlencoded",
    
                                "Body={"sign": "{sign}","token": "68C116cd449034db04C8ff2B7271B345","time": "123456","params": {"city_id": "2419","advert_id": "2139","offset": "0","pagesize": "10"}}",LAST);
    
     
    
    2 web_submit_data 
    intweb_submit_data(const char *StepName, const char *Action,<List of Attributes>, ITEMDATA, <List of data>, [ EXTRARES, <List of Resource Attributes>,] LAST ); 
    
    第二种提交:支post和get请求. 
    web_submit_data("pay_check.php",
    
             "Action=http://buyinterface.{url}/v1/pay_check.php",
    
                                "Method=POST",
    
                                "RecContentType=text/html",
    
                                "Snapshot=t7.inf",
    
                                "Mode=HTML",
    
                                ITEMDATA,
    
                                "Name=my_id", "Value={myid}", ENDITEM,
    
                                "Name=trade_no", "Value={trano_1}", ENDITEM,      
    
                                LAST);
    
    3 web_submit_form.
    intweb_submit_form(const char *StepName, <List of Attributes>, <List of Hidden Fields>, ITEMDATA, <List of Data Fields>, [ EXTRARES, <List of Resource Attributes>,] LAST );
    
    第三种:只支持post请求
    
    web_submit_form("db2net.exe",
    
        ITEMDATA,
    
        "name=library.TITLE", "value=Practical UNIX Security", ENDITEM,
    
        "name=library.AUTHOR_S_", "value=Garfinkel", ENDITEM,
    
        "name=library.SUBJECTS", "value=", ENDITEM,
    
        LAST );
    目前还在学习中,希望会对大家有所帮助,觉得不错,就点赞支持一下。 另外,转载时请附带链接。谢谢!
  • 相关阅读:
    Junit使用教程(四)
    《数据通信与网络》笔记--TCP中的拥塞控制
    Android Apps开发环境搭建
    quick-cocos2d-x教程10:实现血条效果。
    spring实战笔记6---springMVC的请求过程
    LINQ体验(1)——Visual Studio 2008新特性
    eclipse maven 插件的安装和配置
    [LeetCode][Java] Remove Duplicates from Sorted List II
    C++对象模型——解构语意学(第五章)
    SQL SERVER之数据查询
  • 原文地址:https://www.cnblogs.com/dangkai/p/8984645.html
Copyright © 2011-2022 走看看