Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
donuts238483y-Over optimization is the root of all evil
-Don't fix what isn't broken
Sounds like this though haven't gone thru it yet...
https://github.com/EnterpriseQualit... -
Root825993y@donuts ... I'm building a wrapper for an external service. Kinda need the abstraction.
-
donuts238483y@Root maybe debug it one more time and then sleep on it. And then in the morning you get the "it's so obvious... How'd I miss that"
-
Make sure your old code isn't running somewhere. I don't know if this could be an issue, but sometimes I do something and now I get 2 things doing what only one should be doing. I probably don't understand the problem enough to provide a lucid response though.
-
The response is most likely a stream buffer and you must reset the reader pointer to 0 before re-reading it.
-
Root825993yI never did figure out why the behavior changed. It’s odd and makes no sense.
So instead, I added a check and now only read the body if it hasn’t already been read and buffered. It’s also odd, but it works.
@ReverendLovejoy is probably right, but the strange part is why it started behaving that way. -
@Root I found in QML code for Qt that I could actually write code that executed on an object before it "fully" existed in the context. This made for some interesting code that checked for the existence of the object it was being executed on before it existed to be executed on. So I ended up with some stupid check to detect this situation.
My guess is I was doing something I probably shouldn't have been doing in the first place.
This stupid crap is pissing me off.
I write a quick blob of code that performs an http request with custom headers and writes the response to a file. easy squeezy. Everything works.
I abstract it into a class and add request building and stages (enjoayble!), and have one method make the response, read its body, and write to a file. I literally copy/pasted most of my existing code into the method and indented it. The only changes were updating var names to instance vars.
But now? It's complaining something is trying to read the request body twice, and it's throwing a fit. What? How? You were just working!
asfklasjdf;l
rant
non-deterministic grumbles