{"action":"closed","issue":{"url":"https://api.github.com/repos/IBM-Swift/Kitura/issues/129","repository_url":"https://api.github.com/repos/IBM-Swift/Kitura","labels_url":"https://api.github.com/repos/IBM-Swift/Kitura/issues/129/labels{/name}","comments_url":"https://api.github.com/repos/IBM-Swift/Kitura/issues/129/comments","events_url":"https://api.github.com/repos/IBM-Swift/Kitura/issues/129/events","html_url":"https://github.com/IBM-Swift/Kitura/issues/129","id":135084649,"number":129,"title":"Add HTTP methods PATCH and OPTIONS","user":{"login":"rfdickerson","id":1310293,"avatar_url":"https://avatars.githubusercontent.com/u/1310293?v=3","gravatar_id":"","url":"https://api.github.com/users/rfdickerson","html_url":"https://github.com/rfdickerson","followers_url":"https://api.github.com/users/rfdickerson/followers","following_url":"https://api.github.com/users/rfdickerson/following{/other_user}","gists_url":"https://api.github.com/users/rfdickerson/gists{/gist_id}","starred_url":"https://api.github.com/users/rfdickerson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rfdickerson/subscriptions","organizations_url":"https://api.github.com/users/rfdickerson/orgs","repos_url":"https://api.github.com/users/rfdickerson/repos","events_url":"https://api.github.com/users/rfdickerson/events{/privacy}","received_events_url":"https://api.github.com/users/rfdickerson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/IBM-Swift/Kitura/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":{"login":"rfdickerson","id":1310293,"avatar_url":"https://avatars.githubusercontent.com/u/1310293?v=3","gravatar_id":"","url":"https://api.github.com/users/rfdickerson","html_url":"https://github.com/rfdickerson","followers_url":"https://api.github.com/users/rfdickerson/followers","following_url":"https://api.github.com/users/rfdickerson/following{/other_user}","gists_url":"https://api.github.com/users/rfdickerson/gists{/gist_id}","starred_url":"https://api.github.com/users/rfdickerson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rfdickerson/subscriptions","organizations_url":"https://api.github.com/users/rfdickerson/orgs","repos_url":"https://api.github.com/users/rfdickerson/repos","events_url":"https://api.github.com/users/rfdickerson/events{/privacy}","received_events_url":"https://api.github.com/users/rfdickerson/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/IBM-Swift/Kitura/milestones/6","html_url":"https://github.com/IBM-Swift/Kitura/milestones/0.5","labels_url":"https://api.github.com/repos/IBM-Swift/Kitura/milestones/6/labels","id":1597949,"number":6,"title":"0.5","description":"","creator":{"login":"dfirsht","id":5191832,"avatar_url":"https://avatars.githubusercontent.com/u/5191832?v=3","gravatar_id":"","url":"https://api.github.com/users/dfirsht","html_url":"https://github.com/dfirsht","followers_url":"https://api.github.com/users/dfirsht/followers","following_url":"https://api.github.com/users/dfirsht/following{/other_user}","gists_url":"https://api.github.com/users/dfirsht/gists{/gist_id}","starred_url":"https://api.github.com/users/dfirsht/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dfirsht/subscriptions","organizations_url":"https://api.github.com/users/dfirsht/orgs","repos_url":"https://api.github.com/users/dfirsht/repos","events_url":"https://api.github.com/users/dfirsht/events{/privacy}","received_events_url":"https://api.github.com/users/dfirsht/received_events","type":"User","site_admin":false},"open_issues":26,"closed_issues":17,"state":"open","created_at":"2016-02-22T19:28:03Z","updated_at":"2016-02-26T15:47:27Z","due_on":"2016-03-04T06:00:00Z","closed_at":null},"comments":5,"created_at":"2016-02-20T15:11:30Z","updated_at":"2016-02-26T15:47:27Z","closed_at":"2016-02-26T15:47:27Z","body":"- [x] Get\r\n- [x] Post\r\n- [x] Put\r\n- [x] Head\r\n- [x] Delete\r\n- [x] Options\r\n- [ ] Trace\r\n- [ ] Copy\r\n- [ ] Lock\r\n- [ ] Mkcol\r\n- [ ] Move\r\n- [ ] Purge\r\n- [ ] Propfind\r\n- [ ] Proppatch\r\n- [ ] Unlock\r\n- [ ] Report\r\n- [ ] Mkactivity\r\n- [ ] Checkout\r\n- [ ] Merge\r\n- [ ] M-search\r\n- [ ] Notify\r\n- [ ] Subscribe\r\n- [ ] Unsubscribe\r\n- [x] Patch\r\n- [ ] Search\r\n- [ ] Connect\r\n\r\n\r\nUnfortunately, as I have started working on the TodoList, there are a few HTTP methods that we don't handle, namely patch and options. The TodoList API will use PATCH to set a todo item as completed (I don't know why they simply just use PUT). For some reason, because OPTIONS is not specified, the front-end does not know it can use DELETE to delete an option (another thing I'm not sure about the API). \r\n\r\nAnyhow, the change to add these methods should just be adding to KituraRouter the HttpMethod enum and adding a method for adding a route of that type. And to KituraNet ClientRequest the curlHelperSetOptBool and these new method types. I will of course not make these change before Interconnect since we already tagged 0.2- however it is top on my priority list to get this implemented since without it- the todo list does not have the ability to delete or edit items.\r\n\r\n[HTTP methods](http://restful-api-design.readthedocs.org/en/latest/methods.html)"}}