# Building complex REST url

**URL:** <https://discuss.emberjs.com/t/building-complex-rest-url/4207>\
**Category:** Ember Data\
**Created:** [February 19, 2014, 11:11am UTC](https://discuss.emberjs.com/t/building-complex-rest-url/4207 "2014-02-19T11:11:41Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![midd](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/midd/32/196_2.png) [@midd](https://discuss.emberjs.com/u/midd)\
**Post date:** [February 19, 2014, 7:08pm UTC](https://discuss.emberjs.com/t/building-complex-rest-url/4207/4 "2014-02-19T19:08:07Z")

</div>

You can add custom methods in the same one adapter.

```
App.ProductAdapter = DS.RESTAdapter.extend({
    someCustomMethod: function(customData) {
        // Here you can handle custom data, and after that send POST request
        return this.ajax('/ajax.php', 'POST', { data: customData });
    }
});

```

… usage

```
var customAdapter = this.container.lookup('adapter:product');
var data = {
    username: "michael",
    password: "123456",
    clientID: "2",
    productID: 201
};
customAdapter.someCustomMethod(data).then(function(response) {
    // response handler
}, function(e) {
   // error handler
});

```

But I’m not sure that it’s exactly what your need. And are you really use Ember Data or not?

---

_[View the full topic](https://discuss.emberjs.com/t/building-complex-rest-url/4207)._
