Posts

Showing posts from November, 2015

Null Response Headers

Image
Background HTTP Request and Response Header are very cool components of the web. They allow for transmission of some intricate information concerning how the a particular request should be handled. Sometimes however, developers "abuse" the system and hijack this feature for transmitting small amounts of data to and from the webserver. I am one of these system abusers, lol. It just happens that sometimes, our software solutions give us little choice than to do some awkward things. Before you start castigating yourself, its not really a bad practice, so far you only send little amount of text data. Issue Most of my web apps now run on Javascript front-ends, and this comes with its own challenges. I developed a software that sends data to the server to generate a PDF file and the server responds with the filename of the file generated for the client to download. As you could rightly guess, things worked quite perfectly until I migrated to production. The frontend now res

Consume ASP.NET Web API Using PHP and JQuery

Image
Background Whether it is shortage of required skills, platform unavailability or even laziness, anything could make you want to cut some corners in development. And please get me right, by cutting corners I do not mean writing code that is cumbersome and difficult to maintain or leaving out important possible outcomes to favour low turnaround times. There's this popular quote that drives this best practice home: Always code as if the person who ends up maintaining your code is a violent psychopath who knows where you live. Issue We had this project I was working on with a team. Its kind of like a payment aggregator, functioning in similar manner as your regular payment gateways like Paypal, UPL, Interswitch. You can find the project here ( a1pay.net ). I was the front-end guy, which meant that I was basically responsible for presentation. However, in a twist of events, I was also saddled with handling the POST request from our 3rd party payment gateways, consume an alrea