sciter gets the get and post requests of the form

There is very little said about this on the Internet. I will tell you here. Here are the authors I asked directly on github, and the authors gave me some replies

 

https://github.com/c-smile/sciter-sdk/issues/152

 

 

 

Called in the code as follows

 

BOOL ZendSciterRequest::onRequest(LPSCN_LOAD_DATA load_data) {
    HREQUEST request_id;
    UINT request_param_number;
    uint8_t res;
    UINT request_param_count;
    REQUEST_RQ_TYPE rq_type;


     request_id = load_data->requestId;
    res = rapi()->RequestGetRequestType(request_id, &rq_type);
    if (res != REQUEST_OK) {
        return FALSE;
    }
    request_storage.request_type = rq_type;
    res = rapi()->RequestGetNumberOfParameters(request_id, &request_param_number);
    if (res == REQUEST_OK)
    {
        if(request_param_count > 0) {
            LPVOID
            request_ptr = PHPSCITER_G(request).get();
            for (request_param_count = 0; request_param_count < request_param_number; request_param_count++) {
                res = rapi()->RequestGetNthParameterName(request_id, request_param_count, callSciterRequestName,
                                                         request_ptr);
                res = rapi()->RequestGetNthParameterValue(request_id, request_param_count, callSciterRequestValue,
                                                          request_ptr);
                request_storage.request_table[current_request_key] = current_request_value;
            }
        }
    }
}

 

Guess you like

Origin blog.csdn.net/qq_32783703/article/details/105042681