-
Notifications
You must be signed in to change notification settings - Fork 164
Upgrade ktor from 0.3.0 to 0.9.0 #29
Conversation
| } | ||
| } | ||
|
|
||
| class GsonConverter(private val gson: Gson = Gson()) : ContentConverter { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already done, isn't it ? It should be in ktor-gson
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, fixed this in d4b3be9
| val latest = storage.latest(10).map(storage::getThought) | ||
|
|
||
| call.response.pipeline.intercept(ApplicationResponsePipeline.After) { | ||
| if(call.request.contentType().match(ContentType.Application.Json)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Request's content type for GET? I believe it makes no sense as GET requests has no body.
ETag should be always specified to get browser cache working
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to preserve the original behaviour, but I couldn't get the example to work without these changes. I could use some help on this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most likely it doesn't work because of this change
- override var headers: dynamic = json("Accept" to "application/json")
+ override var headers: dynamic = json("Content-Type" to contentType)
I'd say we actually need both Accept and Content-Type headers otherwise the server could reject it. Not sure what is the default Accept header value
|
@dn1345 any progress on this? Really looking forward to see the upgrade. |
resolves #27