Sending a file from a server as a request to another server. Seems like a pretty common scenario. If the file is large, I consider it an anti-pattern most of the time, but there are cases when there is no better choice. Especially if the top management in your 'agile' team are just concerned about delivering a product to the client asap without considering the possible issues that would arise from not compressing such huge payloads, let alone allotting developers in the team the time to solve such problems. But this post isn't a rant about how several 'certified' practitioners of agile methods apply the opposite of the patterns they were supposed to have learnt. Without further ado, let's begin. Axios is a popular promise based HTTP client. When sending a file like a pdf as a request to another server which might expect the file in the files array of the request, you will also have to use FormData , which does not have native support in Node.js. Here's a s...
Damn man, it's pretty nostalgic to come back to this hidden corner of the internet. Funny to see my old tryhard self spit prose like he was gonna change the world or some shit. Eh, at least bro tried. Welp until next time suckers! Keep running that hamster wheel! The top 0.1% needs to enjoy life amirite, slaves? Oh, my bad. The correct term is 'employee'.
Comments
Post a Comment