refactor: changing default string option in write algo to string_ref

boost::string_ref has a lower overhead than std::string and can be
used with no problems with to_string(status_code)
improve usability in examples

- Removed the annoying warning by adding an empty default case.
- Added a break at the final previous case to avoid accidents with
  copy'n'paste.