Interface that provides functionality from whatever environment you're using this library in.
More...
#include <library/include/ipfs_client/client.h>
|
using | SigningKeyType = ::ipfs::crypto::SigningKeyType |
|
using | MimeTypeDeduction = std::function< std::string(std::string, std::string_view, std::string const &)> |
|
using | UrlUnescaping = std::function< std::string(std::string_view)> |
|
using | DnslinkFallbackSwitch = std::function< bool()> |
|
using | ByteView = ::ipfs::ByteView |
|
Interface that provides functionality from whatever environment you're using this library in.
- Note
- A user of this library must implement this, but will probably do so only once.
◆ MimeType()
std::string ipfs::Client::MimeType |
( |
std::string |
extension, |
|
|
std::string_view |
content, |
|
|
std::string const & |
url |
|
) |
| |
Determine a mime type for a given file.
- Parameters
-
extension | - "File extension" not including ., e.g. "html" |
content | - The content of the resource or a large prefix thereof |
url | - A URL it was fetched from (of any sort, ipfs:// is fine) |
◆ UnescapeUrlComponent()
std::string ipfs::Client::UnescapeUrlComponent |
( |
std::string_view |
url_comp | ) |
|
Remove URL escaping, e.g. %20.
- Parameters
-
url_comp | - a single component of the URL, e.g. a element of the path not including / |
- Returns
- The unescaped string
The documentation for this class was generated from the following file: