{"action":"closed","issue":{"url":"https://api.github.com/repos/liyasthomas/postwoman/issues/99","repository_url":"https://api.github.com/repos/liyasthomas/postwoman","labels_url":"https://api.github.com/repos/liyasthomas/postwoman/issues/99/labels{/name}","comments_url":"https://api.github.com/repos/liyasthomas/postwoman/issues/99/comments","events_url":"https://api.github.com/repos/liyasthomas/postwoman/issues/99/events","html_url":"https://github.com/liyasthomas/postwoman/issues/99","id":487254661,"node_id":"MDU6SXNzdWU0ODcyNTQ2NjE=","number":99,"title":"Content-Type revamping","user":{"login":"nickpalenchar","id":7539781,"node_id":"MDQ6VXNlcjc1Mzk3ODE=","avatar_url":"https://avatars1.githubusercontent.com/u/7539781?v=4","gravatar_id":"","url":"https://api.github.com/users/nickpalenchar","html_url":"https://github.com/nickpalenchar","followers_url":"https://api.github.com/users/nickpalenchar/followers","following_url":"https://api.github.com/users/nickpalenchar/following{/other_user}","gists_url":"https://api.github.com/users/nickpalenchar/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpalenchar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpalenchar/subscriptions","organizations_url":"https://api.github.com/users/nickpalenchar/orgs","repos_url":"https://api.github.com/users/nickpalenchar/repos","events_url":"https://api.github.com/users/nickpalenchar/events{/privacy}","received_events_url":"https://api.github.com/users/nickpalenchar/received_events","type":"User","site_admin":false},"labels":[{"id":1523832725,"node_id":"MDU6TGFiZWwxNTIzODMyNzI1","url":"https://api.github.com/repos/liyasthomas/postwoman/labels/discussion","name":"discussion","color":"79f959","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-08-30T02:28:16Z","updated_at":"2019-08-30T23:16:23Z","closed_at":"2019-08-30T23:16:23Z","author_association":"COLLABORATOR","body":"I wanted to start a discussion around the future of Content-Type and what direction everyone thinks we should go in. @NBTX mentioned a great idea in #63 which I'll requote:\r\n\r\n> I think we should make content-type a text field with 'command line completion' (autocomplete) for commonly used content types, rather than restricting to these two content types.\r\n\r\nI personally love this idea. In addition to the auto-complete, a user could chose their own custom type, so that new types would not have to be manually implemented (#88). \r\n\r\nBut a related issue I see is that Content-Type is a **header** and nothing more. POST/PUT requests don't require a Content-Type header to succeed, odd as it would be to omit one. Within the context of postwoman UI you could technically have a Content-Type in the header section while the Content-Type dropdown was selected. It wouldn't be apparent to the user which one was actually set.\r\n\r\nSo I propose a few changes. First is to move the headers above the body, making the hierarchy `Request > Headers > Request Body > Authentication > Parameters > Response > History`. Second, remove the Content-Type dropdown and use it within the Headers section. Third, auto expand the Headers sections when requests types that expect Content-Type is selected--when this happens, Content-Type can pre-populate with `application/json`. The user is then free to modify that header or remove it entirely.\r\n\r\nOpen for discussion--when a conclusion is met I'll make a separate issue detailing the plan"}}
{"actor":{"display_login":"nickpalenchar"}}