GithubHelp home page GithubHelp logo

Comments (4)

tomnomnom avatar tomnomnom commented on June 3, 2024 3

Most of the analysis I do on the output files is done with standard linux tools, so I haven't really thought so much about this kind of thing yet.

To tide you over, here's a bit of bash that will list the files, the address, and the size of the file in bytes:

▶ find . -type f ! -name index -exec echo -n "{} " \; -exec head -n1 {} \; -exec stat --format=%s {} \; | paste - - | column -t
./httpbin.org/b03ba4483f82e897333812b5339b3cea56869d7e  https://httpbin.org/anything/foo/bar/         465
./httpbin.org/2f67264250a88219c3133343f12e6ef2f54eda6c  https://httpbin.org/.well-known/security.txt  712
./httpbin.org/3354bfb9b63c13f529617f9d4ff9df1fe5b9afab  https://httpbin.org/anything/                 449
./httpbin.org/5beaf92c22ec766fee51b0cdc59fb5c0811bb844  https://httpbin.org/anything/foo/bar/         466
...

And here's what I might do if I was looking for only '200 OK' responses:

▶ grep -ril '200 ok' * | grep -v index | xargs -n1 -I{} sh -c "echo -n '{} '; head -n1 {}; stat --format=%s {}" | paste - - | column -t
example.com/51f3333634a04aef57f8917da0e3a1cfca60816b  https://example.com/                   1728
example.com/f591aca5a4b976f816baff849189ef1b8451117f  https://example.com/                   1705
example.com/38c1195f861f6045d07f3e655c616ab7f7d8825c  https://example.com/                   458
example.com/2f723cf900d13593b1e38fec77ee929a992de9d8  https://example.com/                   482
example.com/74e13576952b21af9584698c02261a24af4b915a  https://example.com/                   477
...

from meg.

bugbaba avatar bugbaba commented on June 3, 2024 1

Hi @MadaraTech ,

We can get the length/size of the response by using len(res.body)

Just change this line in your code and then compile it.

screen

Hope it helps :)

from meg.

tomnomnom avatar tomnomnom commented on June 3, 2024

Hello!

That's a thought. I think that would be useful, but I don't want to go too far in to adding features all in one tool. It is a bit of a pain to find real 200 OK responses though for the reason you mention.

I'll give it some thought and get back to you :)

from meg.

ehsandeep avatar ehsandeep commented on June 3, 2024

Hi @tomnomnom,

Any development on this for inbuild support? displaying content length along with status code at runtime?

from meg.

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.