The problem is that I get nothing back? I'm getting an http error 500
internal server error.
On Wednesday, June 15, 2016 at 5:10:50 PM UTC-4, Anthony wrote:
>
> What exactly is the problem? What do you see in the browser network tab
> (i.e., request and response details) and Javascript console (any errors)?
>
> On Wednesday, June 15, 2016 at 4:34:18 PM UTC-4, wdtnh wrote:
>>
>> I would appreciate any insights anyone might have on what I'm doing wrong
>> here. For now just trying to get a simple REST GET request to work
>> At this point, I'm simply trying to get some data where the param is hard
>> coded.
>>
>> Any help would be extremely appreciated. I'm not sure if my $.get is
>> wrong or is it my controller method.
>>
>> In my controller:
>>
>> @request.restful()
>> def testRESTGET():
>> def GET():
>> id =1359
>> account = db.account(id)
>> return account.as_dict() if account else None
>> return locals()
>>
>> in view:
>>
>> function ajaxGet() {
>> $.get( "http://localhost:8000/myApp/accounts/testRESTGET" )
>> .done(function( data ) {
>> alert( "Data Loaded: " + data );
>> });
>>
>>
>>
>>
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.