Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Response ext improvements. Close body #132

Closed
rybalkinsd opened this issue Jul 15, 2019 · 0 comments
Closed

Response ext improvements. Close body #132

rybalkinsd opened this issue Jul 15, 2019 · 0 comments
Assignees
Milestone

Comments

@rybalkinsd
Copy link
Owner

It's better to close body calling asString()

fun Response.asString(): String? = body()?.use { it.string() }
rybalkinsd added a commit that referenced this issue Jul 16, 2019
* 1. closing body
2. added explicit types
3. added docs

* changed patch configuration for codcov

* Update kohttp/src/main/kotlin/io/github/rybalkinsd/kohttp/ext/ResponseExt.kt

Co-Authored-By: DeviantBadge <zhenya_vorobyov@mail.ru>

* Update kohttp/src/main/kotlin/io/github/rybalkinsd/kohttp/ext/ResponseExt.kt

Co-Authored-By: DeviantBadge <zhenya_vorobyov@mail.ru>
@rybalkinsd rybalkinsd self-assigned this Jul 16, 2019
@rybalkinsd rybalkinsd added this to the 0.11.0 milestone Jul 16, 2019
rybalkinsd added a commit that referenced this issue Aug 4, 2019
* 1. closing body
2. added explicit types
3. added docs

* changed patch configuration for codcov

* Update kohttp/src/main/kotlin/io/github/rybalkinsd/kohttp/ext/ResponseExt.kt

Co-Authored-By: DeviantBadge <zhenya_vorobyov@mail.ru>

* Update kohttp/src/main/kotlin/io/github/rybalkinsd/kohttp/ext/ResponseExt.kt

Co-Authored-By: DeviantBadge <zhenya_vorobyov@mail.ru>
rybalkinsd added a commit that referenced this issue Aug 10, 2019
* poc init

* kohttp-jackson module initial

* introduced kohttp-test project for mixed tests with both kohttp-core & kohttp-jackson & etc in future

* 1. renamed kohttp-core -> kohttp
2. gitignore changes
3. changes in gradle to use jacoco multi-module

* removed eager ext

* Response body ext improvements #132 (#133)

* 1. closing body
2. added explicit types
3. added docs

* changed patch configuration for codcov

* Update kohttp/src/main/kotlin/io/github/rybalkinsd/kohttp/ext/ResponseExt.kt

Co-Authored-By: DeviantBadge <zhenya_vorobyov@mail.ru>

* Update kohttp/src/main/kotlin/io/github/rybalkinsd/kohttp/ext/ResponseExt.kt

Co-Authored-By: DeviantBadge <zhenya_vorobyov@mail.ru>

* rebase fixes with `asJson`

* build gradle publication fixes

* fix: escape \r in curl logging

* initial refactoring of multipart body (#148)

* initial refactoring of multipart body

* fixed UploadContext implementation

* updated multipart example

* removing config default client with yaml feature

* Changed asJson() behavior when body is null or empty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant