hi all,
I want some guidance related to mobile app development. I can login successfully from Postman using json type login credential in Body. but failed to get into the GET method, my Contol file is as below. used session_id from Cookies and my url is: http://127.0.0.1:8069/get_brands
showing this when trying to access above url:
{
"jsonrpc": "2.0",
"id": null,
"error": {
"code": 404,
"message": "404: Not Found",
....
}
Is there any other requirements to achieve these 4 methods GET/POST/PUT/DELETE ?
if i create an interface for mobile app like my web app and just access it via mobile, is it ok or there is/are different things to learn ? if it is, please provide the link to the guide to create a custom mobile app OR there is any app exists which i can customize and use as part of my app like inheritance in odoo framework?
Control File ( tests/constollers/controllers.py ):
from odoo import http
from odoo.http import request
class Testapi(http.Controller):
@http.route("/get_brands", type='json', auth='user')
def get_brands(self):
brands_rec = request.env['tests.brands'].search([])
brands = []
for rec in brands_rec:
vals = {
'id': rec.id,
'name': rec.name,
}
brands.append(vals)
print('Brands... ', brands)
data = {'status': 200, 'response': brands, 'message': 'Success'}
return data
hope i will get the solution...
regards