Hi,
I am trying something like that:
#on one local script instance:
import requests

test_params = {'api_key': 'api_key', 'test': 'test', 'f_platform': 
'platform', 'f_device': 'device', 'steps': 'steps',
               'matches':'matches', 'missmatches': 'missmatches', 'steps': 
'steps'}
r = requests.post('http://127.0.0.1:8000/qatests/api', params=test_params)

#and the api function:

@request.restful()
def api():
    response.view = 'generic.'+request.extension
    def GET(search):
        pass
    clients = db(db.auth_user).select(db.auth_user.api_key)
    t = db.t_tests_results
    def POST(**post_params):
        for client in clients:
            if client.api_key == post_params.a:
                return t.validate_and_insert(post_params.b,
                                        post_params.c, post_params.d,
                                        post_params.e, post_params.f,
                                        post_params.g)
            else:
                raise HTTP(400)

It's not working... Any help?
Thanks.








-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to