Coder Social home page Coder Social logo

Put URL and body before headers about ok2curl HOT 6 CLOSED

mrmike avatar mrmike commented on May 22, 2024
Put URL and body before headers

from ok2curl.

Comments (6)

flocsy avatar flocsy commented on May 22, 2024 1

see a possible solution: #55

from ok2curl.

disparate avatar disparate commented on May 22, 2024

@yDelouis
That what works for me in most cases:

val headerIndex = message.indexOf("-H")
val urlIndex = message.indexOf("\"http")
val start = message.substring(0, headerIndex)
val headers = message.substring(headerIndex, urlIndex)
val url = message.substring(urlIndex)
Log.d("Curl", "$start$url $headers")

from ok2curl.

yDelouis avatar yDelouis commented on May 22, 2024

@disparate Thanks for your help, I didn't think of parsing the log string.
I'd still like that it is done by the lib. But in the meantime, I will add this !

from ok2curl.

flocsy avatar flocsy commented on May 22, 2024

+1

from ok2curl.

C2H6O avatar C2H6O commented on May 22, 2024

@disparate can you merge @flocsy's PR in? Is there a reason not to?

from ok2curl.

mrmike avatar mrmike commented on May 22, 2024

@C2H6O I've merged PR and released version 0.7.0.

from ok2curl.

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.