Skip to content

v0.2.1

Latest
Compare
Choose a tag to compare
@PabloVallejo PabloVallejo released this 01 May 02:55
· 11 commits to master since this release
  • Add support for passing full URL to model request method.
// Person model
var Person = Gillie.Model.extend({

    // Base URL
    url: 'http://myapi.com'
});

// Create a person instance
var person = new Person({
    name: 'John',
    age: 30
});

// As normal this will make a request to 
// `http://myapi.com/person`
person.Post( '/person' ); 

// But also, we can specify a full URL for the request.
// This will make a request to `http://otherapi.com/person`.
person.Post( 'http://otherapi.com/person' );