首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏颜颜yan_的学习笔记

    【微信小程序】文章点赞功能的实现

    postData.collectionStatus){ // 当前状态是未收藏 postData.collectionNum // 当前状态是收藏 postData.collectionNum--; postData.collectionStatus postData.upStatus){ postData.upNum++; postData.upStatus = true ; }else{ postData.upNum--; postData.upStatus ; this.execSetStorageSync(allPostData); return postData; } 在页面中使用条件渲染进行判断。

    2.1K30编辑于 2023-02-19
  • 来自专栏程序猿石头

    性能测试工具 - ab

    根据 ab 的 mannual 看到 post 时候, 需要将post的data用文件保存, 然后通过参数 -p postdata.file 传输. 10 postdata.txt ➜ com~apple~CloudDocs$ ll postdata.txt -rw-r--r--@ 1 tanglei staff 10B 4 11 21:26 postdata.txt ➜ com~apple~CloudDocs$ cat postdata1.txt a=65&b=66% ➜ com~apple~CloudDocs$ wc -c postdata1.txt 9 postdata1.txt ➜ com~apple~CloudDocs$ ll postdata1 .txt -rw-r--r--@ 1 tanglei staff 9B 4 11 21:26 postdata1.txt 最后去掉postdata文件末尾的结束符后, 得以成功.

    2.6K30发布于 2020-07-14
  • 来自专栏爬虫逆向案例

    015:Django商城项目表单处理

    = request.POST goods_id = postData.get(“goods_num”) goods_name = postData.get(“goods_name”) goods_price = postData.get(“goods_oprice”) # 原价 goods_now_price = postData.get(“goods_xprice”) # 当前价格 goods_num = request.POST goods_id = postData.get("goods_num") goods_name = postData.get("goods_name") goods_price = postData.get("goods_oprice") # 原价 goods_now_price = postData.get("goods_xprice ") # 描述 goods_content = postData.get("goods_content") # 详情 types = postData.get("goods_type

    40010发布于 2021-11-22
  • 来自专栏爬虫逆向案例

    012:Django高级请求

    处理数据页面 “”" result = {“statue”:“error”,“data”:""} if request.method == “POST” and request.POST: postData ,files = postFile) if student_valid: nickname = postData.get(“nickname”) age = postData.get(“age”) gender = postData.get(“gender”) phone = postData.get(“phone”) email = postData.get(“email”) address = postData.get(“address”) classes = postData.get(“classes”) project = Project.objects.get(id=int(postData.get (“project”))) score = postData.get(“score”) photo = img_file.name s = Student() s.nickname = nickname

    45020发布于 2021-11-22
  • 来自专栏奇梦博客

    调整XiunoBBS上传大尺寸图片加水印错位和水印透明度 配置 JavaScript Xiu

    view/js/xiuno.js 打开,找到1117行、1257行,默认宽度1200px,根据自身情况调整大点即可; xn.upload_file = function(file, upload_url, postdata , complete_callback, progress_callback, thumb_callback) { postdata = postdata || {}; postdata.width  = postdata.width || 1600; //默认宽度 postdata.height = postdata.height || 2800; //默认高度 //对图片进行裁切,缩略,对黑色背景

    92030发布于 2018-07-18
  • 来自专栏程序猿石头

    性能测试工具 - ab 简单应用

    根据 ab 的 mannual 看到 post 时候, 需要将post的data用文件保存, 然后通过参数-p postdata.file传输. ➜ com~apple~CloudDocs$ wc -c postdata.txt 10 postdata.txt ➜ com~apple~CloudDocs$ ll postdata.txt -rw-r--r--@ 1 tanglei staff 10B 4 11 21:26 postdata.txt ➜ com~apple~CloudDocs$ cat postdata1.txt a=65& b=66% ➜ com~apple~CloudDocs$ wc -c postdata1.txt 9 postdata1.txt ➜ com~apple~CloudDocs$ ll postdata1 .txt -rw-r--r--@ 1 tanglei staff 9B 4 11 21:26 postdata1.txt 最后去掉postdata文件末尾的结束符后, 得以成功.

    80330发布于 2020-07-14
  • 来自专栏小蔚记录

    vue --- axios发post请求后台接收不到参数的三种解决方案

    npm install qs --save-dev 然后在需要使用的页面引入一下: import qs from 'qs' 引入好了之后,把上面的postData用qs转一下再发送给后台就可以了: let postData = qs.stringify({ certificationAccount: that.certificationAccount, balance: 二:使用URLSearchParams ; let postData= new URLSearchParams() postData.append('certificationAccount', that.certificationAccount ) postData.append('balance', that.balance) 这样也可以,个人觉得写起来麻烦。 三、直接使用字符串 let postData ='certificationAccount =' + that.certificationAccount + '&balance=' + that.balance

    6.5K30发布于 2019-09-11
  • 来自专栏Excel催化剂

    Excel催化剂开源第42波-与金融大数据TuShare对接实现零门槛零代码获取数据

    private static string GetPostData(Excel.Range row, string[] columnNamesOfParas) { PostData postData = new PostData(); postData.token = Properties.Settings.Default.TuShareAPIKey; = dic; return JsonConvert.SerializeObject(postData); } 现接下来的核心代码,就是向Web API提交数据了 foreach (Excel.ListRow row in ListObjectOfParas.ListRows) { string postData = postData }; string resultJson = httpHelper.GetHtml(httpItem).Html;

    70810发布于 2021-08-19
  • 来自专栏小孟开发笔记

    curl超时时间设置

    普通秒级超时使用: 复制代码 代码如下: curl_setopt(ch,  CURLOPT_NOSIGNAL,true);//支持毫秒级别超时设置 封装函数示例 function curl_post3(url, postData ) { postData = json_encode(postData); curl = curl_init(); //初始化 curl_setopt(curl,CURLOPT_URL /设置url curl_setopt(curl,CURLOPT_POST,1); //设置发送方式为post请求 curl_setopt(curl,CURLOPT_POSTFIELDS,postData ); //设置post的数据 curl_setopt(postData)) ); result = curl_exec(curl); curl_close( 未经允许不得转载

    10.1K50编辑于 2023-02-23
  • 来自专栏ITJoker的吹逼专栏

    关于某加速器的破解方法

    cid = random.randint(0,9) #节点 url = 'http://示例IP:示例端口/api/user/getserver' headers = {} postdata = {} KEY1= '密钥1' KEY2 = '密钥2' postdata['v'] = v postdata['imei'] = imei postdata ['id'] = id_ postdata['user'] = id_ postdata['cid'] = cid headers['User-Agent'] = 'okhttp headers['Content-Type'] = 'application/x-www-form-urlencoded' response = requests.post(url,data=postdata

    3.3K20编辑于 2022-08-30
  • 来自专栏Node.js开发

    fusionUI表单组件的补充

    }; const onSubmit = (values, errors) => { console.log('values:', values); console.log('postData :', postData); }; return ( <Card free> <Card.Content className={styles.settingPersonBlock &&`http://alfuser.quchangguan.cn/${postData.image[0].url}`} shape="circle" size={64 的image属性,当表单中的上传了图片组件时,chang执行,postdata变化,图片实时显示。 这样,当触发submit事件时,我们既可以从函数的参数获取表单的值,也可以从postdata获取值。 以上便是fusionUI上传组件的补充,希望对你有所帮助。

    1.3K30编辑于 2021-12-24
  • 来自专栏黯羽轻扬

    鱼和熊掌我都要之 Render-as-You-Fetch 模式

    const postData = useFragment(graphql` fragment PostData on Post @refetchable(queryName: "PostQuery return (

    {postData.title}

    by {postData.author}

    {/* more = preloadRestEndpoint( PostData.endpointUrl, { postId: routeParams.id, }, 为此,Facebook 在 GraphQL 中实现了@defer指令: // Post.js function Post(props) { const postData = useFragment( UI non-blocking too */} <Suspense fallback={<Spinner/>}> <CommentList post={postData}

    1.1K20发布于 2019-12-03
  • 来自专栏大师级码师

    VB使用XMLHTTP实现Post与Get的方法分享

    -----------释放空间 Set XMLHTTP = Nothing Exit FunctionERR: GetData = ""End Function Public Function PostData DataS Case ResponseBody '--------------------------------直接返回二进制 DataB = XMLHTTP.ResponseBody PostData '---------------------------二进制转字符串[直接返回字串出现乱码时尝试] DataS = BytesToStr(XMLHTTP.ResponseBody) PostData = DataS Case Else '--------------------------------无效的返回 PostData = "" End Select '-------- ----------------------------释放空间 Set XMLHTTP = Nothing Exit FunctionERR: PostData = ""End Function

    1.9K00编辑于 2022-11-06
  • 来自专栏SeanCheney的专栏

    Python模拟登陆 —— 征服验证码 10 知乎(倒立文字验证码)

    Version/5.0.2 Mobile/8J2 Safari/6533.18.5', # 'DNT': '1', # 'Connection': 'Keep-Alive' } postData content = content.read() with open(captcha_name, 'wb') as f: f.write(content) postData ['captcha'] = input('请输入验证码') # postData['_xsrf'] = get_xsrf() postData['_xsrf'] = 'fa5ae712244bd4287e371801052003fc ' print(postData['_xsrf']) #用urlopen函数传送数据给服务器实现登录 postData_encoded = urllib.parse.urlencode (postData).encode('utf-8') req = urllib.request.Request(url=webUrl,data=postData_encoded,headers=

    1.1K110发布于 2018-04-24
  • 来自专栏PHP开发者那些事

    腾讯云OCR文字识别PHP demo

    php $url = "https://recognition.image.myqcloud.com/ocr/handwriting"; // $postData = ['appid'=>"appid 1254540501.cosgz.myqcloud.com/%E6%89%8B%E5%86%99%E4%BD%93.jpg"]; $image = file_get_contents('1.jpg'); $postData 'Content-Type: multipart/form-data','Authorization: 生成的的authorization']; $ch = curl_init($url); // $postData = json_encode($postData); // Content-Type: application/json // curl_setopt($ch, CURLOPT_TIMEOUT, 8); CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $postData

    15.9K21发布于 2020-06-23
  • 来自专栏PHP在线

    php 跨域 form提交 2种方法

    1:php的curl方式 function curlPost($url,$params) { $postData = ''; foreach($params as $k => $v) { $postData $v.'&'; } rtrim($postData, '&'); $ch = curl_init(); curl_setopt($ch,CURLOPT_URL,$url); curl_setopt CURLOPT_RETURNTRANSFER,true); curl_setopt($ch,CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_POST, count($postData )); curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); $output=curl_exec($ch); curl_close($ch);

    1.3K50发布于 2018-03-07
  • 来自专栏编程录

    cloudflare视频转码接口

    $vide_name . '"}}'; $response = \Requests::post($url, $headers, $data); $postData = json_decode ($response->body); if ($postData->success) { return $postData; } else { /media/{$videoCode}"; $response = \Requests::get($url, $headers); $postData = json_decode ($response->body); if($postData->success){ return $postData; }else{

    5.7K30发布于 2019-09-19
  • 来自专栏我的博客

    PHP模拟GET和POST提交数据

    /* *@param String $url是请求地址 *@param Array $getData 是GET数据 *@param Array $postData */ public function Http($url, $getData, $postData) { if (! is_array($postData))) { return ''; } //读取url后面参数 $parse_url = parse_url ); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postData curl_close($ch); return $result; } else { $content = http_build_query($postData

    2.5K80发布于 2018-05-08
  • 来自专栏游戏开发之旅

    Unity的WWW请求的几种方式解析

    uwr.chunkedTransfer = false; _uwr.SendWebRequest(); } 2.byte数组: public WWW(string url, byte[] postData _uwr.chunkedTransfer = false; UploadHandler formUploadHandler = new UploadHandlerRaw(postData DownloadHandlerBuffer(); _uwr.SendWebRequest(); } public WWW(string url, byte[] postData , Dictionary<string, string> headers) { var verb = postData == null ? _uwr.chunkedTransfer = false; UploadHandler formUploadHandler = new UploadHandlerRaw(postData

    1.9K20发布于 2019-12-03
  • 来自专栏前端导学

    原生node处理get和post请求

    判断接口类型 if(method==='GET'){ res.end(JSON.stringify(resData)) } if(method==='POST'){ let postData ='' //数据流 req.on('data',chunk=>{ postData+=chunk.toString() }); req.on( 'end',()=>{ resData.postData=postData res.end(JSON.stringify(resData)) }) } }

    1K30发布于 2020-10-14
领券