# Ember-Cli Rest-APi Without Adapter

**URL:** <https://discuss.emberjs.com/t/ember-cli-rest-api-without-adapter/8995>\
**Category:** Ember CLI\
**Created:** [October 23, 2015, 9:56am UTC](https://discuss.emberjs.com/t/ember-cli-rest-api-without-adapter/8995 "2015-10-23T09:56:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shayanypn](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/shayanypn/32/11573_2.png) [@shayanypn](https://discuss.emberjs.com/u/shayanypn)\
**Post date:** [October 23, 2015, 9:56am UTC](https://discuss.emberjs.com/t/ember-cli-rest-api-without-adapter/8995/1 "2015-10-23T09:56:55Z")

</div>

Iam trying to create a Simple Rest-api with out ember data adapter. the problem is , that i can’t make a ajax request with header, i means all request calls with header just stop after prefixer request ( option request).

**The Important Thing is That This Reqest Work Fine on Old Ember**

app/route/application.js

```
import Ember from 'ember';
export default Ember.Route.extend({
    model() {
        Ember.$.ajax({
            url: 'url',
            type: "POST",
            headers: { 
                "Accept" : "application/json; charset=utf-8",
                "Content-Type": "application/json; charset=utf-8",
            }
        });
    }
});

```

but is just call “Option” request, and then nothing happend. this is my option request response

Rqeust Header:

```
Host: localhost
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Origin: http://localhost:4200
Access-Control-Request-Method: POST
Access-Control-Request-Headers: content-type
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache

```

Response Header:

```
Connection: Keep-Alive
Content-Length: 569
Content-Type: text/html; charset=iso-8859-1
Date: Fri, 23 Oct 2015 04:16:51 GMT
Keep-Alive: timeout=5, max=100
Server: Apache/2.4.10 (Ubuntu)

```

response server is php slim framework.
