samedi 1 octobre 2016

Ember + Pyramid Ember Data Request returned a 0 Payload (Empty Content-Type)

I need make application with pyramid and emberjs. I have pyramid view

@view_config(route_name='events', request_method='GET', renderer='json')
def events_view(request):
    query = request.dbsession.query(User)
    one = query.filter(User.id).all()
    json_string = json.dumps({"color": "red"})
    return Response(json_string)

For develop I need configure ember adapter with local host

import DS from 'ember-data';
export default DS.RESTAdapter.extend({
  corsWithCredentials: true,
  host: 'http://127.0.0.1:6543',
  namespace: ''
});

and I have this error

> Error while processing route: events.index "Ember Data Request
> GET http://ift.tt/2cI56jv returned a 0 Payload (Empty
> Content-Type) "




Aucun commentaire:

Enregistrer un commentaire