title: How can I get a User-agent from user request?
body: <p>I have to get <code>User-agent</code> from a user request and add custom info to that <code>User-agent</code> and send it back. 
  I have the following controller:</p>
  
  <pre><code>@RequestMapping("/orders")
  @Controller
  public class MyController {
      @GetMapping("/new_order")
      public String newOrder(RedirectAttributes redirectAttributes, Model model) {
          if (isUserNotAuthorized()) {
              return getLoginRedirectPage(redirectAttributes, "/login");
          }
          model.addAttribute("order", new Order());
          // How to retrieve User-agent and add some custom info and return it back to the user?
          return "new_order";
      }
  }
  </code></pre>
  
  <p>Thanks for your help!</p>