Skip to Content
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1236 Представления

I just wanted to retrieve user data from Odoo12 through node.js, so I called 'web/session/authenticate'  which worked. but when I tried to call an image from 'web/image/'  it didn't work and showed error 404. and can't call any route in odoo

However, I tried calling it through Postman, and it worked perfectly.

my code below.

	​
const result = await axios.post(`
http://localhost:8069/web/session/authenticate`, 
{         
​"jsonrpc": "2.0",          
​"params": {           
​ "db": "mydatabase", 
     "login": "admin", 
     "password": password,         
​}      
},       
{
​ headers: {'Content-Type': 'application/json'},       
}     
);
     
if (result && result.data.result != undefined) {
   const res = result.data.result;
const resultImg = await axios.get(` http://localhost:8069/web/image/res.partner/3/image`);

AxiosError: Request failed with status code 404


}
        

       

 

 



Аватар
Отменить
Related Posts Ответы Просмотры Активность
5
мая 25
32107
2
мая 23
9776
4
февр. 23
40702
2
дек. 19
7392
4
сент. 19
3832