xml-rpc post for user.login
Ciao a tutti,
vorrei fare una richiesta di autenticazione utente da REST Server utilizzanto XMLRCP della root con il metodo user.login
Tuttavia ho il messaggio che user.login non è specificato.
Nemmeno system.connect è specificato e il modulo services è presente ed attivo.
Qualcuno tosto ha una dritta?

Risposte
Ho trovato questo: drupal
Ho trovato questo:
drupal org node/910598
? $base_url = 'http://localhost/test_endpoint'; $data = array( 'username' => 'admin', 'password' => 'password', ); $data = drupal_json_encode($data); $options = array( 'headers' => array( 'Content-Type' => 'application/json', ), 'method' => 'POST', 'data' => $data ); $response = drupal_http_request($base_url . '/user/login', $options); $data = json_decode($response->data); // Check if login was successful if ($response->code == 200) { // Now recycle the login cookie we received in the first request $options['headers']['Cookie'] = $data->session_name . '=' . $data->sessid; // Get info about a user $data = array(); $options['data'] = http_build_query($data, '', '&'); $options['method'] = 'GET'; $response = drupal_http_request($base_url . '/user/32', $options); }Ma ritorna "Wronf username or password"
Help?