"But it is not referentially transparent!" LOL
Good work, @li_haoyi !
-
-
-
To be honest, the way the first function was written isn't referentially transparent, either.

- Show replies
New conversation -
-
-
For the next person who runs into this, the resolution is here:https://stackoverflow.com/questions/53783653/scala-http4s-giving-401-unauthorized-for-same-request-that-works-in-curl-reques …
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Note that the http4s version also safely allocates and releases a scarce resource, layers on extra redirect behavior, integrates a pluggable third-party JSON library, all with referential transparency. I like requests-scala, but let's not pretend these functions are equivalent.
-
honestly i have no problem with those things; it isn’t that stuff that is boilerplaty, it’s mostly the imports for the typed domain model that’s adding lines. I had a spec proposal that would help fix that: would love for types models to be more seamless https://github.com/dsl-paradise/dsl-paradise …
- Show replies
New conversation -
-
-
I’m sure your library is very nice, but that’s not a like-for-like comparison.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
The type signature of the latter is clearly a monstrous lie, and if you believe in it then your code will die horribly at runtime. I’m inclined to categorize it as a criminal neglect of professional responsibility.
-
So is the former, I guess. I strenuously object to both.
- Show replies
New conversation -
-
-
The http4s version does not sent the `Authorization` header following redirects on the same domain, which is why it "doesn't work". We spoke about this on gitter. Moreover, the request can be more concise and stringly typed just as in request if you so want.
-
LOL Scala's resident Ruby programmer being disingenuous? Who'd have thought. He also forgot to include all the imports, including a friggin `unsafeRunSync` AND unnecessary redirects, content headers, client accessors etc. Be better imo.
@JM0x5C scala does not deserve your time.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.