I recently had one of the senior developers on my team code up a simple REST API server and client, using SSL, basic authentication, and .NET Core. I was a little shocked to see how much code it took just to get the basic plumbing working, and I immediately started to wonder about which languages and frameworks might have been more suited to the task. My code-golf question would look something like:

Write a client and server that communicate using REST over SSL. They can be in 2 languages if you want (although maybe that turns this into 2 golfing competitions?). The REST service takes 2 integers between 0 and 100 and returns the sum of these integers, and is only available to user "foo" with password "bar".

Thanks in advance for your thoughts (or for a link to a place where this competition has already happened). I do realize this has smells of "which library is best for xyz?" and that it may just not work at all in this forum, but the problem does still feel golfable to me.

  • \$\begingroup\$ I don't know if anything is too practical. It could be a problem if it was too long or hard, though. \$\endgroup\$
    – Wezl
    May 1 '20 at 23:46
  • 2
    \$\begingroup\$ you'd have to describe the protocol in pretty high detail. Also keep in mind that quite a number of languages here don't have network connectivity. \$\endgroup\$
    – S.S. Anne
    May 2 '20 at 18:22
  • 3
    \$\begingroup\$ There are plenty of challenges that a lot of languages can't compete in, so that's not a problem. \$\endgroup\$ May 2 '20 at 23:51
  • 4
    \$\begingroup\$ Difficulty/practicality are not particularly important to this site. The real problem is what S.S. Anne mentions, that you would need to fully describe REST and SSL to make the challenge clear. If you do decide to try this, make sure to use our sandbox. I do not have a strong knowledge of secure networking, but I'd also be worried that to test code one would need a paid certificate. That won't make it unpostable, but I'd be very worried about getting no responses. \$\endgroup\$ May 4 '20 at 15:08

You must log in to answer this question.

Browse other questions tagged .