GetJedi/app/src/main/java/edu/getjedi/frontend/mobile/state/ProfessionalLoggedState.java
public void dispatchService(String category, String name, String description, String price){
        HashMap<String, String> map = new HashMap<String, String>();
        if(context != null && context.getUser() != null) {
            map.put("category", category);
            map.put("serviceName", name);
            map.put("description", description);
            map.put("hourlyPrice", price);
            map.put("professionalId", context.getUser().getId());

            context.getScreen().getHttpHandler().makePOSTRequestForObject(new String[]{"createService"}, map);
        }
    }
/**
     * Dispatches a new service offer to the server.
     */
Dispatches a new service offer to the server.
Dispatches a new service offer to the server .
public void dispatchService(String category, String name, String description, String price){
        HashMap<String, String> map = new HashMap<String, String>();
        if(context != null && context.getUser() != null) {
            map.put("category", category);
            map.put("serviceName", name);
            map.put("description", description);
            map.put("hourlyPrice", price);
            map.put("professionalId", context.getUser().getId());
            context.getScreen().getHttpHandler().makePOSTRequestForObject(new String[]{"createService"}, map);
        }
    }
public void dispatchService ( String category , String name , String description , String price ) { HashMap < String , String > map = new HashMap < String , String > ( ) ; if ( context != null && context . getUser ( ) != null ) { map . put ( "category" , category ) ; map . put ( "serviceName" , name ) ; map . put ( "description" , description ) ; map . put ( "hourlyPrice" , price ) ; map . put ( "professionalId" , context . getUser ( ) . getId ( ) ) ; context . getScreen ( ) . getHttpHandler ( ) . makePOSTRequestForObject ( new String [ ] { "createService" } , map ) ; } }
Dispatches a new service offer to the server.
Dispatches a new service offer to the server .