• <small id='nevcg'></small><noframes id='nevcg'>

  • <tfoot id='nevcg'></tfoot>
    <i id='nevcg'><tr id='nevcg'><dt id='nevcg'><q id='nevcg'><span id='nevcg'><b id='nevcg'><form id='nevcg'><ins id='nevcg'></ins><ul id='nevcg'></ul><sub id='nevcg'></sub></form><legend id='nevcg'></legend><bdo id='nevcg'><pre id='nevcg'><center id='nevcg'></center></pre></bdo></b><th id='nevcg'></th></span></q></dt></tr></i><div id='nevcg'><tfoot id='nevcg'></tfoot><dl id='nevcg'><fieldset id='nevcg'></fieldset></dl></div>

    <legend id='nevcg'><style id='nevcg'><dir id='nevcg'><q id='nevcg'></q></dir></style></legend>

        • <bdo id='nevcg'></bdo><ul id='nevcg'></ul>
      1. 在 C++ 跨平台中解析 url 的简单方法?

        时间:2023-08-03

          <bdo id='7Sfht'></bdo><ul id='7Sfht'></ul>

            <tbody id='7Sfht'></tbody>

              <legend id='7Sfht'><style id='7Sfht'><dir id='7Sfht'><q id='7Sfht'></q></dir></style></legend>
              1. <tfoot id='7Sfht'></tfoot>
                • <small id='7Sfht'></small><noframes id='7Sfht'>

                  <i id='7Sfht'><tr id='7Sfht'><dt id='7Sfht'><q id='7Sfht'><span id='7Sfht'><b id='7Sfht'><form id='7Sfht'><ins id='7Sfht'></ins><ul id='7Sfht'></ul><sub id='7Sfht'></sub></form><legend id='7Sfht'></legend><bdo id='7Sfht'><pre id='7Sfht'><center id='7Sfht'></center></pre></bdo></b><th id='7Sfht'></th></span></q></dt></tr></i><div id='7Sfht'><tfoot id='7Sfht'></tfoot><dl id='7Sfht'><fieldset id='7Sfht'></fieldset></dl></div>
                  本文介绍了在 C++ 跨平台中解析 url 的简单方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  在我用 C++ 编写的应用程序中,我需要解析 URL 以获取协议、主机、路径和查询.该应用程序旨在跨平台.我很惊讶我在 boost 或 POCO 库.是不是很明显我没在看?关于适当的开源库的任何建议?或者这是我必须自己做的事情?这不是超级复杂,但似乎是一项常见的任务,我很惊讶没有通用的解决方案.

                  I need to parse a URL to get the protocol, host, path, and query in an application I am writing in C++. The application is intended to be cross-platform. I'm surprised I can't find anything that does this in the boost or POCO libraries. Is it somewhere obvious I'm not looking? Any suggestions on appropriate open source libs? Or is this something I just have to do my self? It's not super complicated but it seems like such a common task I am surprised there isn't a common solution.

                  推荐答案

                  有一个建议用于 Boost 包含的库,它允许您轻松解析 HTTP URI.它使用 Boost.Spirit,也是在 Boost 软件许可下发布的.该库是 cpp-netlib,您可以在 http://cpp-netlib.github.com/找到其文档 -- 您可以从 http://github.com/下载最新版本cpp-netlib/cpp-netlib/downloads .

                  There is a library that's proposed for Boost inclusion and allows you to parse HTTP URI's easily. It uses Boost.Spirit and is also released under the Boost Software License. The library is cpp-netlib which you can find the documentation for at http://cpp-netlib.github.com/ -- you can download the latest release from http://github.com/cpp-netlib/cpp-netlib/downloads .

                  您将要使用的相关类型是 boost::network::http::uri 并记录在 这里.

                  The relevant type you'll want to use is boost::network::http::uri and is documented here.

                  这篇关于在 C++ 跨平台中解析 url 的简单方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何从节点在 Heroku 上运行可执行文件,在本地工 下一篇:将 cURL 内容结果保存到 C++ 中的字符串中

                  相关文章

                  最新文章

                • <tfoot id='3tYGH'></tfoot>
                  • <bdo id='3tYGH'></bdo><ul id='3tYGH'></ul>

                  <small id='3tYGH'></small><noframes id='3tYGH'>

                • <legend id='3tYGH'><style id='3tYGH'><dir id='3tYGH'><q id='3tYGH'></q></dir></style></legend>

                      <i id='3tYGH'><tr id='3tYGH'><dt id='3tYGH'><q id='3tYGH'><span id='3tYGH'><b id='3tYGH'><form id='3tYGH'><ins id='3tYGH'></ins><ul id='3tYGH'></ul><sub id='3tYGH'></sub></form><legend id='3tYGH'></legend><bdo id='3tYGH'><pre id='3tYGH'><center id='3tYGH'></center></pre></bdo></b><th id='3tYGH'></th></span></q></dt></tr></i><div id='3tYGH'><tfoot id='3tYGH'></tfoot><dl id='3tYGH'><fieldset id='3tYGH'></fieldset></dl></div>