zoukankan      html  css  js  c++  java
  • post请求

    Action()
    {


    int HttpRetCode; //定义一个变量,用于接收HTTP返回的状态码
    web_add_header("Session-Id", "2b694fd3-f30b-49a0-9445-8ec840460b1a"); //请求头
    //web_add_header("Content-Type", "application/json"); //请求头

    lr_start_transaction("提现");

    web_custom_request("提现", //随便写个名字
    "Method=POST", //请求的方法
    "URL=http://192.168.1.191:8080/users/withdraw", //请求地址
    "RecContentType=application/json", //指定相应头的Content-Type,这里是JSON
    "EncType=application/json", //指定请求头的Content-Type,这里也是JSON
    "Mode=HTML",
    RAW_BODY_START, //请求BODY开始的标识符
    "{"amount":12,"coinType":1,"address":"0xB039016F9903d8C243b7B726DcA855aE67d4899e","password":"123456a"}", //跟踪分组动态
    102,
    RAW_BODY_END, //请求BODY结束的标识符
    LAST);


    HttpRetCode=web_get_int_property(HTTP_INFO_RETURN_CODE); //获取返回的状态码
    if(HttpRetCode==200) //如果状态码返回200,则是成功的
    { lr_output_message("成功!");
    lr_end_transaction("提现", LR_PASS);
    }
    else
    { lr_output_message("失败!");
    lr_end_transaction("提现", LR_FAIL);
    }


    return 0;
    }

  • 相关阅读:
    2017.4.18下午
    2017.4.18上午
    2017.4.17上午
    2017.4.14下午
    2017.4.14上午
    4.17下午
    4.17上午
    4.13下午
    4.13上午
    4.10上午
  • 原文地址:https://www.cnblogs.com/lanyy/p/8882923.html
Copyright © 2011-2022 走看看