File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ All notable changes to this project will be documented in this file. Changes not
1818
1919# [ Unreleased]
2020
21+ ## Added
22+
23+ - Set ` Content-Type ` to HttpBody and Text HttpResponse. ([ #474 ] ( https://github.com/httpswift/swifter/pull/474 ) ) by [ @mtgto ] ( https://github.com/mtgto )
24+
2125## Fixed
2226
2327* Fix misspell ` serialise ` . ([ #473 ] ( https://github.com/httpswift/swifter/pull/473 ) ) by [ @mtgto ] ( https://github.com/mtgto )
Original file line number Diff line number Diff line change @@ -136,7 +136,8 @@ public enum HttpResponse {
136136 case . ok( let body) :
137137 switch body {
138138 case . json: headers [ " Content-Type " ] = " application/json "
139- case . html: headers [ " Content-Type " ] = " text/html "
139+ case . html, . htmlBody: headers [ " Content-Type " ] = " text/html "
140+ case . text: headers [ " Content-Type " ] = " text/plain "
140141 case . data( _, let contentType) : headers [ " Content-Type " ] = contentType
141142 default : break
142143 }
You can’t perform that action at this time.
0 commit comments