package com.ds.listing.rest;

import com.ds.listing.model.User;
import com.ds.listing.services.UserService;

import java.util.ArrayList;

import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.FormParam;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;

@Path("/users")
public class UserRestService {
  
  @Inject
  private UserService service;
  
  @POST
  @Path("/login")
  @Produces("application/json")
  public User login(@FormParam("user") String user, @FormParam("password") String password) {
      return service.login(user, password);
  }
}

@@ -466,20 +466,22 @@
  login(@
-Form
+Header
 Param(%22u
@@ -490,107 +490,437 @@
 r%22) 
-String user, @FormParam(%22password%22) String password) %7B%0A      return service.login(user, password);%0A
+UserDetails user) %7B%0A      return service.login(user, password);%0A  %7D%0A  %0A%7D%0Aclass UserDetails %7B%0A    private String user;%0A    private String password;%0A    public String getUser()%7B%0A        return this.user;%0A    %7D%0A    public String getPassword()%7B%0A        return this.password;%0A    %7D%0A    public void setUser(String user)%7B%0A        this.user = user;%0A    %7D%0A    public void setPassword(String password)%7B%0A        this.password = password;%0A  
   %7D%0A

fix query