本文整理汇总了C++中web::http::uri_builder::append_query方法的典型用法代码示例。如果您正苦于以下问题:C++ uri_builder::append_query方法的具体用法?C++ uri_builder::append_query怎么用?C++ uri_builder::append_query使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类web::http::uri_builder
的用法示例。
在下文中一共展示了uri_builder::append_query方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: request
web::http::http_request get_service_stats(web::http::uri_builder uri_builder, const std::chrono::seconds& timeout, operation_context context)
{
uri_builder.append_query(uri_query_resource_type, resource_service);
uri_builder.append_query(uri_query_component, component_stats);
web::http::http_request request(base_request(web::http::methods::GET, uri_builder, timeout, context));
return request;
}
示例2:
web::http::http_request delete_message(const cloud_queue& queue, const cloud_queue_message& message, web::http::uri_builder uri_builder, const std::chrono::seconds& timeout, operation_context context)
{
uri_builder.append_query(U("popreceipt"), message.pop_receipt());
web::http::http_request request = queue_base_request(web::http::methods::DEL, uri_builder, timeout, context);
return request;
}
示例3:
web::http::http_request update_message(const cloud_queue_message& message, std::chrono::seconds visibility_timeout, bool update_contents, web::http::uri_builder& uri_builder, const std::chrono::seconds& timeout, operation_context context)
{
uri_builder.append_query(core::make_query_parameter(_XPLATSTR("popreceipt"), message.pop_receipt()));
uri_builder.append_query(core::make_query_parameter(_XPLATSTR("visibilitytimeout"), visibility_timeout.count(), /* do_encoding */ false));
web::http::http_request request = queue_base_request(web::http::methods::PUT, uri_builder, timeout, context);
if (update_contents)
{
protocol::message_writer writer;
std::string content = writer.write(message);
request.set_body(content);
}
return request;
}
示例4: add_query_if_not_empty
void add_query_if_not_empty(web::http::uri_builder& builder, const utility::string_t& name, const utility::string_t& value, bool do_encoding)
{
if (!value.empty())
{
builder.append_query(core::make_query_parameter(name, value, do_encoding));
}
}