{"action":"opened","issue":{"url":"https://api.github.com/repos/twg/devour/issues/42","repository_url":"https://api.github.com/repos/twg/devour","labels_url":"https://api.github.com/repos/twg/devour/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/twg/devour/issues/42/comments","events_url":"https://api.github.com/repos/twg/devour/issues/42/events","html_url":"https://github.com/twg/devour/issues/42","id":160121802,"number":42,"title":"Request with POST or PATCH doesn't work","user":{"login":"ghunti","id":392038,"avatar_url":"https://avatars.githubusercontent.com/u/392038?v=3","gravatar_id":"","url":"https://api.github.com/users/ghunti","html_url":"https://github.com/ghunti","followers_url":"https://api.github.com/users/ghunti/followers","following_url":"https://api.github.com/users/ghunti/following{/other_user}","gists_url":"https://api.github.com/users/ghunti/gists{/gist_id}","starred_url":"https://api.github.com/users/ghunti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghunti/subscriptions","organizations_url":"https://api.github.com/users/ghunti/orgs","repos_url":"https://api.github.com/users/ghunti/repos","events_url":"https://api.github.com/users/ghunti/events{/privacy}","received_events_url":"https://api.github.com/users/ghunti/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-14T08:13:12Z","updated_at":"2016-06-14T08:13:12Z","closed_at":null,"body":"Hi.\r\n\r\nWhen you try to perform an arbitrary request with methods `PATCH` or `POST`, you end up getting an error: `TypeError: Cannot read property 'options' of undefined`.\r\nI've tracked this down to the `_serialize.js` file, method `resource`. The problem is that in line 11 `let model = this.modelFor(modelName)` since we are not providing a model, the model variable is undefined and when we call `model.options` latter, the error is triggered.\r\n\r\nEx of calling code: `jsonApi.request('https://example.com', 'POST', { a_query_param: 3 }, { some_payload_item: 'blah' })`\r\n\r\nThanks\r\n"}}
{"actor":{"display_login":"ghunti"}}