Giter VIP home page Giter VIP logo

Comments (13)

zihadrizkyef avatar zihadrizkyef commented on August 23, 2024 1

Thank you, really love your library :)

from chucker.

xbao avatar xbao commented on August 23, 2024

Is the server returning the 'Content-Type' as 'application/json' (or any string that contains 'json')?

from chucker.

cortinico avatar cortinico commented on August 23, 2024

So Chucker won't pretty print your JSON body unless the Content-Type header contains json.

If your backend is not setting the Content-Type properly, the body won't be parsed and will just be returned as it is.

On the other hand, I'm updating the font of the body to use a monospace as it will make everything more readable (see #118)

from chucker.

zihadrizkyef avatar zihadrizkyef commented on August 23, 2024

Hi @cortinico, my backend already setting Content-Type: application/json. but Chucker still not pretty print. What can i do to fix this?

image

from chucker.

cortinico avatar cortinico commented on August 23, 2024

Is this happening with every request @zihadrizkyef ? Have you tried the Chucker sample app? Is that happing also over there?

from chucker.

zihadrizkyef avatar zihadrizkyef commented on August 23, 2024

Is this happening with every request @zihadrizkyef?

I was using chuck v2.0.4 and it was pretty printed. But after i update the version to v3.0.1, the request is no longer pretty printed.
It happen in all request.

Have you tried the Chucker sample app? Is that happing also over there?

No, i dont use the sample

from chucker.

shaubert avatar shaubert commented on August 23, 2024

com.chuckerteam.chucker.api.internal.data.entity.HttpTransaction.kt:205

fun getFormattedResponseBody(): String {
    return responseBody?.let { formatBody(it, requestContentType) } ?: ""
}

should be responseContentType

from chucker.

cortinico avatar cortinico commented on August 23, 2024

@shaubert You're correct. That has already been fixed in #103 and will be shipped in the upcoming release 3.1.0 (that will ideally also fix the pretty printing issue)

from chucker.

cortinico avatar cortinico commented on August 23, 2024

@zihadrizkyef In the meanwhile, you can try the latest develop snapshots that should contain the fix:

https://github.com/ChuckerTeam/chucker#snapshots-

from chucker.

notsatyarth avatar notsatyarth commented on August 23, 2024

Hi there. Just wanted to follow up on the release plan for this. Is there an eta for 3.1.0 ?

from chucker.

cortinico avatar cortinico commented on August 23, 2024

Hi there. Just wanted to follow up on the release plan for this. Is there an eta for 3.1.0 ?

Ideally should be out in a couple of weeks. If you need the latest develop branch, you can still use the snapshots

from chucker.

Aksi0m avatar Aksi0m commented on August 23, 2024

Hi! Any new info about the time when the 3.1.0 is supposed to come out?

from chucker.

cortinico avatar cortinico commented on August 23, 2024

Hi! Any new info about the time when the 3.1.0 is supposed to come out?

More info on this in #194 👍

from chucker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.