Example #1
0
 void append_groups_token(web::uri_builder& builder, const utility::string_t& groups_token)
 {
     if (groups_token.length() > 0)
     {
         builder.append_query(_XPLATSTR("groupsToken"), groups_token, /* do_encoding */ true);
     }
 }
Example #2
0
 void append_connection_data(web::uri_builder& builder, const utility::string_t& connection_data)
 {
     if (connection_data.length() > 0)
     {
         builder.append_query(_XPLATSTR("connectionData"), connection_data, /* do_encoding */ true);
     }
 }
Example #3
0
 void append_message_id(web::uri_builder& builder, const utility::string_t& message_id)
 {
     if (message_id.length() > 0)
     {
         builder.append_query(_XPLATSTR("messageId"), message_id, /* do_encoding */ true);
     }
 }
Example #4
0
 void append_connection_token(web::uri_builder &builder, const utility::string_t &connection_token)
 {
     if (connection_token.length() > 0)
     {
         builder.append_query(_XPLATSTR("connectionToken"), connection_token, /* do_encoding */ true);
     }
 }
Example #5
0
        web::uri_builder build_uri(const web::uri& base_url, const utility::string_t& command, transport_type transport,
            const utility::string_t& connection_data, const utility::string_t& query_string,
            const utility::string_t& last_message_id = _XPLATSTR(""), const utility::string_t& groups_token = _XPLATSTR(""))
        {
            _ASSERTE(command == _XPLATSTR("reconnect") || (last_message_id.length() == 0 && groups_token.length() == 0));

            web::uri_builder builder(base_url);
            builder.append_path(command);
            append_transport(builder, transport);
            builder.append_query(_XPLATSTR("clientProtocol"), PROTOCOL);
            //append_connection_token(builder, connection_token);
            append_connection_data(builder, connection_data);
            append_message_id(builder, last_message_id);
            append_groups_token(builder, groups_token);
            return builder.append_query(query_string);
        }