用户输入的卷曲请求

时间:2018-09-22 02:06:04

标签: c++ curl libcurl

似乎我不能将变量用作curl的发布参数。我不明白为什么它不起作用。我尝试打印该变量,并且该变量与我希望的完全一样。如果直接将其作为参数:“ useremail = testuser&password = lol123&action = login&remember = remember”;它工作正常,但我想使用用户输入变量...

pwTF.textContentType = .newPassword
pwTF.passwordRules = UITextInputPasswordRules(descriptor: "required: upper; required: lower; required: digit; max-consecutive: 2; minlength: 16;")

1 个答案:

答案 0 :(得分:2)

* ./components/passport/AuthorizedClients.vue in ./resources/js/app.js
* ./components/passport/Clients.vue in ./resources/js/app.js
* ./components/passport/PersonalAccessTokens.vue in ./resources/js/app.js
       Asset     Size  Chunks                    Chunk Names
  /js/app.js  1.38 MB       0  [emitted]  [big]  /js/app
/css/app.css   198 kB       0  [emitted]         /js/app

ERROR in ./resources/js/app.js
Module not found: Error: Can't resolve './components/passport/AuthorizedClients.vue' in '/projects/dw_api_gateway/laravel/resources/js'
 @ ./resources/js/app.js 22:45-99
 @ multi ./resources/js/app.js ./resources/sass/app.scss

ERROR in ./resources/js/app.js
Module not found: Error: Can't resolve './components/passport/Clients.vue' in '/projects/dw_api_gateway/laravel/resources/js'
 @ ./resources/js/app.js 20:34-78
 @ multi ./resources/js/app.js ./resources/sass/app.scss

ERROR in ./resources/js/app.js
Module not found: Error: Can't resolve './components/passport/PersonalAccessTokens.vue' in '/projects/dw_api_gateway/laravel/resources/js'
 @ ./resources/js/app.js 24:49-106
 @ multi ./resources/js/app.js ./resources/sass/app.scss
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @ dev: `NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the @ dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-09-22T02_04_09_398Z-debug.log

不是将curl_easy_setopt(curl, CURLOPT_POSTFIELDS, ...); 作为第三个参数,而是指向std::string的指针,因此您应该将其传递给char,并希望data.c_str()不会尝试修改自curl_easy_setup()起返回std::string::c_str()的数据。