Ll_length=Len (senddata publishes the event)
Ls_header="content-type: application/json ~ n" + & amp;
"Token:" + token + "~ n" + & amp;
"The Content - Length:" + String (ll_length) + "~ n ~ n
"Li_rc=iinet. PostURL (ls_url senddata publishes the event, ls_header, n_ir_msgbox)
Str_json=n_ir_msgbox. Is_data
Mle_1. Text=str_json
In the header header files must pass the token value
CodePudding user response:
Posturl didn't come across this problem, has been applied in the project many times, look at the return values of error posturl, then analyzes the reasons of problemsThe Return value
Integer. Returns values as follows:
1 Success
1 the General error
- 2 Invalid URL
- 4 always connect to the Internet
- 5 Unsupported secure (HTTPS) connection attempted
- 6 Internet request failed