anchor.diff:          {token, Token},
           {size, Size}
       ]}),
  -    do_request(RestAddress ++ "/provider/spaces", Headers, post, Body, Options).
  +    Response = do_request(RestAddress ++ "/provider/spaces", Headers, post, Body, Options),
  +    get_header_val("spaces", Response).
   
   get_provider_spaces(ReqParams) ->
       {RestAddress, Headers, Options} = ReqParams,
  -    do_request(RestAddress ++ "/provider/spaces", Headers, get, [], Options).
  +    Response = do_request(RestAddress ++ "/provider/spaces", Headers, get, [], Options),
  +    [Spaces] = get_body_val([spaces],Response),
  +    Spaces
  +.
   
   get_provider_space(SID, ReqParams) ->
       {RestAddress, Headers, Options} = ReqParams,
  -    do_request(RestAddress ++ "/provider/spaces/" ++ binary_to_list(SID), Headers, get, [], Options).
  +    Response =
  +        do_request(RestAddress ++ "/provider/spaces/" ++ binary_to_list(SID), Headers, get, [], Options),
  +%%     TODO test what is in the response, remove later
  +    ?PRINT(Response),
  +    get_body_val([spaceId, name, size],Response).
   
   delete_provider_space(SID, ReqParams) ->
       {RestAddress, Headers, Options} = ReqParams,
  
positive.code: 
  
  check_provider_ip(ReqParams)->
  {RestAddress, _, _} = ReqParams,
  do_request(RestAddress ++ "/provider/test/check_my_ip", [], get).
  
  check_provider_ports(ReqParams)->
  {RestAddress, _, _} = ReqParams,
  do_request(RestAddress ++ "/provider/test/check_my_ports", [], post).
  
  
  %% User functions
  
negative.code:     {RestAddress, Headers, Options} = ReqParams,
      do_request(RestAddress ++ "/groups/" ++ binary_to_list(GID) , Headers, delete,[], Options).
  
  get_group_invitation_token(GID, ReqParams) ->
      {RestAddress, Headers, Options} = ReqParams,
      Response =
          do_request(
              RestAddress ++ "/groups/" ++ binary_to_list(GID)++ "/users/token", Headers, get, [], Options
          ),
      ?PRINT(Response),
      [Token] = get_body_val([token], Response),
      Token.
  
  %% Spaces functions
  