parse_query.hpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //
  2. // Copyright (c) 2019 Vinnie Falco ([email protected])
  3. // Copyright (c) 2022 Alan de Freitas ([email protected])
  4. //
  5. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  6. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. //
  8. // Official repository: https://github.com/CPPAlliance/url
  9. //
  10. #ifndef BOOST_URL_PARSE_PARAMS_HPP
  11. #define BOOST_URL_PARSE_PARAMS_HPP
  12. #include <boost/url/detail/config.hpp>
  13. #include <boost/url/error_types.hpp>
  14. #include <boost/url/params_encoded_view.hpp>
  15. #include <boost/core/detail/string_view.hpp>
  16. namespace boost {
  17. namespace urls {
  18. /** Parse a string and return an encoded params view
  19. This function parses the string and returns the
  20. corresponding params object if the string is valid,
  21. otherwise returns an error.
  22. @par BNF
  23. @code
  24. @endcode
  25. @par Exception Safety
  26. No-throw guarantee.
  27. @return A valid view on success, otherwise an
  28. error code.
  29. @param s The string to parse
  30. @par Specification
  31. @see
  32. @ref params_encoded_view.
  33. */
  34. BOOST_URL_DECL
  35. system::result<params_encoded_view>
  36. parse_query(core::string_view s) noexcept;
  37. } // urls
  38. } // boost
  39. #endif