Unverified Commit d8790b48 authored by Tachi's avatar Tachi

Initial docusaurus migration

parent a91cb1c4
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>404 Page Not Found</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Pistache is a C++ REST framework focussed on high performance and clear API. Pistache is a free software written by Mathieu Stefani and available on Github - https://github.com/oktal/pistache
">
<link rel="canonical"
href="http://pistache.io/404.html">
<!-- Harmony styles -->
<link rel="stylesheet" type="text/css" href="/assets/css/main.css">
<!-- Modernizr js -->
<script async src="/assets/js/modernizr.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-fork-ribbon-css/0.2.0/gh-fork-ribbon.min.css" />
<!--[if lt IE 9]>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-fork-ribbon-css/0.2.0/gh-fork-ribbon.ie.min.css" />
<![endif]-->
<!-- IE Fixes -->
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="theme-base-01">
<header class="main-header">
<div class="wc-container">
<img id="img-logo" src="/assets/images/logo.png" />
<h1>
<a href="/">Pistache</a>
</h1>
<h2>An elegant C++ REST framework.</h2>
<ul>
<li>
<a href="/">Pistache</a><span>/</span>
</li>
<li>
<a href="/quickstart">Getting Started</a><span>/</span>
</li>
<li>
<a href="/guide/">User's Guide</a><span>/</span>
</li>
<li>
<a title="Pistache on Github"
href="https://github.com/oktal/pistache" target="_blank">
Source code
</a><span>/</span>
</li>
</ul>
<div style="text-align: center">
<iframe src="https://ghbtns.com/github-btn.html?user=oktal&repo=pistache&type=star&count=true&size=large" frameborder="0" scrolling="0" width="160px" height="30px"></iframe>
<iframe src="https://ghbtns.com/github-btn.html?user=oktal&repo=pistache&type=fork&count=true&size=large" frameborder="0" scrolling="0" width="158px" height="30px"></iframe>
</div>
</div>
</header>
<div class="page-content wc-container">
<h3>404 Page Not Found</h3>
<h4>The page you were looking for is not found.</h4>
<p>Sorry, we've misplaced that URL or it's pointing to something that
doesn't exist. Please <a href="">head back home</a> to try finding it again.</p>
</div>
<footer class="main-footer">
<div class="wc-container">
<div class="column one">
<h6>Few more links</h6>
<ul class="menu">
</ul>
</div>
<div class="column two">
<h6>Follow me</h6>
<ul class="social-media">
<li>
<a title="oktal on Github"
href="https://github.com/oktal"
class="github wc-img-replace" target="_blank">Github</a>
</li>
</ul>
</div>
</div>
<p class="wc-container disclaimer">
Powered by <a href="http://jekyllrb.com" target="_blank">Jekyll</a>
</p>
</footer>
<script type="text/javascript">
/* To avoid render blocking css */
var cb = function() {
var l = document.createElement('link'); l.rel = 'stylesheet';
l.href = 'http://fonts.googleapis.com/css?family=Ubuntu+Mono&subset=latin';
var h = document.getElementsByTagName('head')[0]; h.parentNode.insertBefore(l, h);
};
var raf = requestAnimationFrame || mozRequestAnimationFrame ||
webkitRequestAnimationFrame || msRequestAnimationFrame;
if (raf) raf(cb);
else window.addEventListener('load', cb);
</script>
<!-- jQuery -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<!-- When no internet load JQuery from local -->
<script>window.jQuery || document.write('<script src="/assets/js/jquery.min.js"><\/script>')</script>
<!-- Site js -->
<script src="/assets/js/all.js"></script>
<!-- Google analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-xxxx-x']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>
pistache.io
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="7px" height="7px" viewBox="0 0 7 7" enable-background="new 0 0 7 7" xml:space="preserve">
<rect fill="#666766" width="7" height="7"/>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="224px" height="64px" viewBox="0 0 224 64" enable-background="new 0 0 224 64" xml:space="preserve">
<path fill="#383838" d="M24,11c-0.6,0.3-1.2,0.4-1.9,0.5c0.7-0.4,1.2-1,1.4-1.8c-0.6,0.4-1.3,0.6-2.1,0.8c-0.6-0.6-1.5-1-2.4-1
c-1.8,0-3.3,1.5-3.3,3.3c0,0.3,0,0.5,0.1,0.7c-2.7-0.1-5.1-1.4-6.8-3.4c-0.3,0.5-0.4,1-0.4,1.7c0,1.1,0.6,2.1,1.5,2.7
c-0.5,0-1-0.2-1.5-0.4l0,0c0,1.6,1.1,2.9,2.6,3.2c-0.4,0.3-1,0.3-1.5,0c0.4,1.3,1.6,2.3,3.1,2.3c-1.1,0.9-2.5,1.4-4.1,1.4
c-0.3,0-0.5,0-0.8,0c1.5,0.9,3.2,1.5,5,1.5c6,0,9.3-5,9.3-9.3c0-0.1,0-0.3,0-0.4C23,12.3,23.6,11.7,24,11z"/>
<path fill="#383838" d="M78,16v8h3v-8h2l1-3h-3c0,0,0-0.5,0-1.3c0-0.3,0.2-0.7,0.7-0.7c1,0,2.9,0,2.3,0V8c0,0-1.6,0-3.3,0
C79,8,78,9.3,78,10.8s0,2.3,0,2.3h-2v3h2V16z"/>
<path fill="#383838" d="M112,24c-4.4,0-8-3.6-8-8s3.6-8,8-8s8,3.6,8,8S116.4,24,112,24z M118.7,17.1c-0.2-0.1-2.1-0.6-4.3-0.3
c0.9,2.5,1.1,3.7,1.3,4.9C117.4,20.6,118.4,19,118.7,17.1z M114.7,22.3c-0.2-1.2-0.5-2.7-1.5-5.2l0,0c-3.9,1.3-5.2,4-5.4,4.3
C109.4,22.7,112,23.2,114.7,22.3z M106.9,20.6c1.6-3.1,5.8-4.6,5.9-4.6c-0.2-0.4-0.4-0.8-0.6-1.2c-3.4,1-6.7,1-7,1
C105.1,17.7,105.8,19.4,106.9,20.6z M105.3,14.6c0.3,0,3.1,0,6.3-0.8c-1.1-2-2.3-3.7-2.5-4C107.2,10.7,105.8,12.5,105.3,14.6z
M110.4,9.4c0.2,0.3,1.4,1.9,2.5,4c2.4-0.9,3.5-2.3,3.6-2.5C115.3,9.8,113,8.9,110.4,9.4z M117.3,11.7c-0.1,0.2-1.3,1.7-3.8,2.7
c0.2,0.3,0.4,0.9,0.6,1.4c2.3-0.3,4,0,4.8,0.2C118.9,14.2,118.2,12.8,117.3,11.7z"/>
<path fill="#383838" d="M170,20c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2c1.1,0,2-0.9,2-2C172.1,21,171.1,20,170,20z M168,13.4v3.1
c4.2,0,7.5,3.6,7.5,7.5h3.1C178.6,18.2,173.8,13.4,168,13.4z M168,8v3.1c7.1,0,12.9,5.8,12.9,12.9h3.1C184,15.2,176.8,8,168,8z"/>
<path fill="#383838" d="M50.8,17.1c-0.6,0-1.1,0.7-1.1,1.6c0,0.9,0.5,1.6,1.1,1.6c0.6,0,1.1-0.7,1.1-1.6
C51.9,17.8,51.4,17.1,50.8,17.1z M54.7,13.1c0.1-0.3,0.1-2.1-0.6-3.8c0,0-1.6,0.2-4,1.8c-0.5-0.1-1.3-0.2-2.2-0.2s-1.7,0.1-2.2,0.2
c-2.4-1.6-4-1.8-4-1.8c-0.7,1.7-0.7,3.5-0.6,3.8C40.5,13.9,40,15,40,16.4c0,6.2,5.2,6.3,6.5,6.3c0.3,0,0.9,0,1.5,0
c0.6,0,1.2,0,1.5,0c1.3,0,6.5-0.1,6.5-6.3C56,15,55.5,13.9,54.7,13.1z M48,22L48,22c-3.3,0-5.9-0.4-5.9-3.6c0-0.8,0.3-1.5,0.9-2.1
c1.1-1,2.9-0.5,4.9-0.5c0,0,0,0,0,0c0,0,0,0,0,0c2.1,0,3.9-0.5,4.9,0.5c0.6,0.6,0.9,1.3,0.9,2.1C53.9,21.6,51.3,22,48,22z
M45.2,17.1c-0.6,0-1.1,0.7-1.1,1.6c0,0.9,0.5,1.6,1.1,1.6c0.6,0,1.1-0.7,1.1-1.6C46.4,17.8,45.9,17.1,45.2,17.1z"/>
<path fill="#383838" d="M143.1,11.8c-0.2-1.7-1.4-3-2.5-3s-2,1.3-1.8,2.9c0.2,1.7,1.4,3,2.5,3.1C142.4,14.8,143.2,13.4,143.1,11.8z
M141.2,18c-1.8,0-3.4,1.1-3.4,2.6s1.3,2.6,3,2.6c2.5,0,3.4-1.1,3.4-2.6c0-0.2,0-0.3-0.1-0.5c-0.2-0.8-0.9-1.2-1.8-1.9
C142,18.1,141.6,18,141.2,18z M143.2,8.8c1,0.4,1.5,1.6,1.5,2.9c0,1-0.6,1.9-1.3,2.6c-0.7,0.6-0.9,0.9-0.9,1.4
c0,0.5,0.8,1.2,1.2,1.5c1.2,1,1.6,1.8,1.6,3.2c0,1.8-1.6,3.6-4.5,3.6c-2.6,0-4.7-1.1-4.7-2.9c0-1.8,2-3.6,4.5-3.6h0.8
c-0.3-0.4-0.6-0.8-0.6-1.4c0-0.3,0.1-0.6,0.2-1c-0.2,0-0.3,0-0.4,0c-2.1,0-3.5-1.6-3.5-3.6c0-1.9,1.9-3.6,4-3.6h4.6l-1,0.8H143.2
L143.2,8.8z M151,12h-2v2h-1v-2h-2v-1h2V9h1v2h2V12z"/>
<path fill="#383838" d="M206.9,18.6c-0.4,2.2-0.9,4.3-2.5,5.4c-0.5-3.3,0.7-5.8,1.2-8.5c-0.9-1.5,0.1-4.6,2-3.9
c2.4,0.9-2.1,5.7,0.9,6.3c3.1,0.6,4.4-5.4,2.5-7.4c-2.8-2.8-8.1-0.1-7.5,4c0.2,1,1.2,1.3,0.4,2.7c-1.8-0.4-2.3-1.8-2.2-3.7
c0.1-3.1,2.8-5.2,5.4-5.5c3.4-0.4,6.5,1.2,7,4.4c0.5,3.6-1.5,7.4-5.1,7.2C208.1,19.5,207.7,19,206.9,18.6z"/>
<path fill="#FFFFFF" d="M24,43c-0.6,0.3-1.2,0.4-1.9,0.5c0.7-0.4,1.2-1,1.4-1.8c-0.6,0.4-1.3,0.6-2.1,0.8c-0.6-0.6-1.5-1-2.4-1
c-1.8,0-3.3,1.5-3.3,3.3c0,0.3,0,0.5,0.1,0.7c-2.7-0.1-5.1-1.4-6.8-3.4c-0.3,0.5-0.4,1-0.4,1.7c0,1.1,0.6,2.1,1.5,2.7
c-0.5,0-1-0.2-1.5-0.4l0,0c0,1.6,1.1,2.9,2.6,3.2c-0.4,0.3-1,0.3-1.5,0c0.4,1.3,1.6,2.3,3.1,2.3c-1.1,0.9-2.5,1.4-4.1,1.4
c-0.3,0-0.5,0-0.8,0c1.5,0.9,3.2,1.5,5,1.5c6,0,9.3-5,9.3-9.3c0-0.1,0-0.3,0-0.4C23,44.3,23.6,43.7,24,43z"/>
<path fill="#FFFFFF" d="M78,48v8h3v-8h2l1-3h-3c0,0,0-0.5,0-1.3c0-0.3,0.2-0.7,0.7-0.7c1,0,2.9,0,2.3,0v-3c0,0-1.6,0-3.3,0
C79,40,78,41.3,78,42.8s0,2.3,0,2.3h-2v3L78,48L78,48z"/>
<path fill="#FFFFFF" d="M112,56c-4.4,0-8-3.6-8-8s3.6-8,8-8s8,3.6,8,8S116.4,56,112,56z M118.7,49.1c-0.2-0.1-2.1-0.6-4.3-0.3
c0.9,2.5,1.1,3.7,1.3,4.9C117.4,52.6,118.4,51,118.7,49.1z M114.7,54.3c-0.2-1.2-0.5-2.7-1.5-5.2l0,0c-3.9,1.3-5.2,4-5.4,4.3
C109.4,54.7,112,55.2,114.7,54.3z M106.9,52.6c1.6-3.1,5.8-4.6,5.9-4.6c-0.2-0.4-0.4-0.8-0.6-1.2c-3.4,1-6.7,1-7,1
C105.1,49.7,105.8,51.4,106.9,52.6z M105.3,46.6c0.3,0,3.1,0,6.3-0.8c-1.1-2-2.3-3.7-2.5-4C107.2,42.7,105.8,44.5,105.3,46.6z
M110.4,41.4c0.2,0.3,1.4,1.9,2.5,4c2.4-0.9,3.5-2.3,3.6-2.5C115.3,41.8,113,40.9,110.4,41.4z M117.3,43.7c-0.1,0.2-1.3,1.7-3.8,2.7
c0.2,0.3,0.4,0.9,0.6,1.4c2.3-0.3,4,0,4.8,0.2C118.9,46.2,118.2,44.8,117.3,43.7z"/>
<path fill="#FFFFFF" d="M170,52c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2c1.1,0,2-0.9,2-2C172.1,53,171.1,52,170,52z M168,45.4v3.1
c4.2,0,7.5,3.6,7.5,7.5h3.1C178.6,50.2,173.8,45.4,168,45.4z M168,40v3.1c7.1,0,12.9,5.8,12.9,12.9h3.1C184,47.2,176.8,40,168,40z"
/>
<path fill="#FFFFFF" d="M50.8,49.1c-0.6,0-1.1,0.7-1.1,1.6c0,0.9,0.5,1.6,1.1,1.6c0.6,0,1.1-0.7,1.1-1.6
C51.9,49.8,51.4,49.1,50.8,49.1z M54.7,45.1c0.1-0.3,0.1-2.1-0.6-3.8c0,0-1.6,0.2-4,1.8c-0.5-0.1-1.3-0.2-2.2-0.2s-1.7,0.1-2.2,0.2
c-2.4-1.6-4-1.8-4-1.8c-0.7,1.7-0.7,3.5-0.6,3.8C40.5,45.9,40,47,40,48.4c0,6.2,5.2,6.3,6.5,6.3c0.3,0,0.9,0,1.5,0
c0.6,0,1.2,0,1.5,0c1.3,0,6.5-0.1,6.5-6.3C56,47,55.5,45.9,54.7,45.1z M48,54L48,54c-3.3,0-5.9-0.4-5.9-3.6c0-0.8,0.3-1.5,0.9-2.1
c1.1-1,2.9-0.5,4.9-0.5c0,0,0,0,0,0c0,0,0,0,0,0c2.1,0,3.9-0.5,4.9,0.5c0.6,0.6,0.9,1.3,0.9,2.1C53.9,53.6,51.3,54,48,54z
M45.2,49.1c-0.6,0-1.1,0.7-1.1,1.6c0,0.9,0.5,1.6,1.1,1.6c0.6,0,1.1-0.7,1.1-1.6C46.4,49.8,45.9,49.1,45.2,49.1z"/>
<path fill="#FFFFFF" d="M143.1,43.8c-0.2-1.7-1.4-3-2.5-3s-2,1.3-1.8,2.9c0.2,1.7,1.4,3,2.5,3.1C142.4,46.8,143.2,45.4,143.1,43.8z
M141.2,50c-1.8,0-3.4,1.1-3.4,2.6c0,1.4,1.3,2.6,3,2.6c2.5,0,3.4-1.1,3.4-2.6c0-0.2,0-0.3-0.1-0.5c-0.2-0.8-0.9-1.2-1.8-1.9
C142,50.1,141.6,50,141.2,50z M143.2,40.8c1,0.4,1.5,1.6,1.5,2.9c0,1-0.6,1.9-1.3,2.6c-0.7,0.6-0.9,0.9-0.9,1.4
c0,0.5,0.8,1.2,1.2,1.5c1.2,1,1.6,1.8,1.6,3.2c0,1.8-1.6,3.6-4.5,3.6c-2.6,0-4.7-1.1-4.7-2.9c0-1.8,2-3.6,4.5-3.6h0.8
c-0.3-0.4-0.6-0.8-0.6-1.4c0-0.3,0.1-0.6,0.2-1c-0.2,0-0.3,0-0.4,0c-2.1,0-3.5-1.6-3.5-3.6c0-1.9,1.9-3.6,4-3.6h4.6l-1,0.8H143.2
L143.2,40.8z M151,44h-2v2h-1v-2h-2v-1h2v-2h1v2h2V44z"/>
<path fill="#FFFFFF" d="M206.9,50.6c-0.4,2.2-0.9,4.3-2.5,5.4c-0.5-3.3,0.7-5.8,1.2-8.5c-0.9-1.5,0.1-4.6,2-3.9
c2.4,0.9-2.1,5.7,0.9,6.3c3.1,0.6,4.4-5.4,2.5-7.4c-2.8-2.8-8.1-0.1-7.5,4c0.2,1,1.2,1.3,0.4,2.7c-1.8-0.4-2.3-1.8-2.2-3.7
c0.1-3.1,2.8-5.2,5.4-5.5c3.4-0.4,6.5,1.2,7,4.4c0.5,3.6-1.5,7.4-5.1,7.2C208.1,51.5,207.7,51,206.9,50.6z"/>
</svg>
This diff is collapsed.
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, main {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
\ No newline at end of file
.highlight { background: #ffffff; }
.highlight .c { color: #999988; font-style: italic } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { font-weight: bold } /* Keyword */
.highlight .o { font-weight: bold } /* Operator */
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #999999 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #aaaaaa } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { font-weight: bold } /* Keyword.Constant */
.highlight .kd { font-weight: bold } /* Keyword.Declaration */
.highlight .kp { font-weight: bold } /* Keyword.Pseudo */
.highlight .kr { font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #009999 } /* Literal.Number */
.highlight .s { color: #d14 } /* Literal.String */
.highlight .na { color: #008080 } /* Name.Attribute */
.highlight .nb { color: #0086B3 } /* Name.Builtin */
.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
.highlight .no { color: #008080 } /* Name.Constant */
.highlight .ni { color: #800080 } /* Name.Entity */
.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
.highlight .nn { color: #555555 } /* Name.Namespace */
.highlight .nt { color: #000080 } /* Name.Tag */
.highlight .nv { color: #008080 } /* Name.Variable */
.highlight .ow { font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mf { color: #009999 } /* Literal.Number.Float */
.highlight .mh { color: #009999 } /* Literal.Number.Hex */
.highlight .mi { color: #009999 } /* Literal.Number.Integer */
.highlight .mo { color: #009999 } /* Literal.Number.Oct */
.highlight .sb { color: #d14 } /* Literal.String.Backtick */
.highlight .sc { color: #d14 } /* Literal.String.Char */
.highlight .sd { color: #d14 } /* Literal.String.Doc */
.highlight .s2 { color: #d14 } /* Literal.String.Double */
.highlight .se { color: #d14 } /* Literal.String.Escape */
.highlight .sh { color: #d14 } /* Literal.String.Heredoc */
.highlight .si { color: #d14 } /* Literal.String.Interpol */
.highlight .sx { color: #d14 } /* Literal.String.Other */
.highlight .sr { color: #009926 } /* Literal.String.Regex */
.highlight .s1 { color: #d14 } /* Literal.String.Single */
.highlight .ss { color: #990073 } /* Literal.String.Symbol */
.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #008080 } /* Name.Variable.Class */
.highlight .vg { color: #008080 } /* Name.Variable.Global */
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
jQuery(document).ready(function($){
// todo: jquery stuff should need to put here.
});
This diff is collapsed.
/* Modernizr 2.8.3 (Custom Build) | MIT & BSD
* Build: http://modernizr.com/download/#-borderradius-shiv-cssclasses-teststyles-testprop-testallprops-prefixes-domprefixes-load
*/
;window.Modernizr=function(a,b,c){function z(a){j.cssText=a}function A(a,b){return z(m.join(a+";")+(b||""))}function B(a,b){return typeof a===b}function C(a,b){return!!~(""+a).indexOf(b)}function D(a,b){for(var d in a){var e=a[d];if(!C(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function E(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:B(f,"function")?f.bind(d||b):f}return!1}function F(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+o.join(d+" ")+d).split(" ");return B(b,"string")||B(b,"undefined")?D(e,b):(e=(a+" "+p.join(d+" ")+d).split(" "),E(e,b,c))}var d="2.8.3",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n="Webkit Moz O ms",o=n.split(" "),p=n.toLowerCase().split(" "),q={},r={},s={},t=[],u=t.slice,v,w=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["&#173;",'<style id="s',h,'">',a,"</style>"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},x={}.hasOwnProperty,y;!B(x,"undefined")&&!B(x.call,"undefined")?y=function(a,b){return x.call(a,b)}:y=function(a,b){return b in a&&B(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=u.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(u.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(u.call(arguments)))};return e}),q.borderradius=function(){return F("borderRadius")};for(var G in q)y(q,G)&&(v=G.toLowerCase(),e[v]=q[G](),t.push((e[v]?"":"no-")+v));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)y(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},z(""),i=k=null,function(a,b){function l(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function q(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return s.shivMethods?o(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(s,b.frag)}function r(a){a||(a=b);var c=n(a);return s.shivCSS&&!g&&!c.hasCSS&&(c.hasCSS=!!l(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),k||q(a,c),a}var c="3.7.0",d=a.html5||{},e=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,f=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,g,h="_html5shiv",i=0,j={},k;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b)}(this,b),e._version=d,e._prefixes=m,e._domPrefixes=p,e._cssomPrefixes=o,e.testProp=function(a){return D([a])},e.testAllProps=F,e.testStyles=w,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+t.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
\ No newline at end of file
This diff is collapsed.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Pistache</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Pistache is a C++ REST framework focussed on high performance and clear API. Pistache is a free software written by Mathieu Stefani and available on Github - https://github.com/oktal/pistache
">
<link rel="canonical"
href="http://pistache.io/">
<!-- Harmony styles -->
<link rel="stylesheet" type="text/css" href="/assets/css/main.css">
<!-- Modernizr js -->
<script async src="/assets/js/modernizr.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-fork-ribbon-css/0.2.0/gh-fork-ribbon.min.css" />
<!--[if lt IE 9]>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-fork-ribbon-css/0.2.0/gh-fork-ribbon.ie.min.css" />
<![endif]-->
<!-- IE Fixes -->
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="theme-base-01">
<header class="main-header">
<div class="wc-container">
<img id="img-logo" src="/assets/images/logo.png" />
<h1>
<a href="/">Pistache</a>
</h1>
<h2>An elegant C++ REST framework.</h2>
<ul>
<li>
<a class="active" href="/" class="active">Pistache</a><span>/</span>
</li>
<li>
<a href="/quickstart">Getting Started</a><span>/</span>
</li>
<li>
<a href="/guide/">User's Guide</a><span>/</span>
</li>
<li>
<a title="Pistache on Github"
href="https://github.com/oktal/pistache" target="_blank">
Source code
</a><span>/</span>
</li>
</ul>
<div style="text-align: center">
<iframe src="https://ghbtns.com/github-btn.html?user=oktal&repo=pistache&type=star&count=true&size=large" frameborder="0" scrolling="0" width="160px" height="30px"></iframe>
<iframe src="https://ghbtns.com/github-btn.html?user=oktal&repo=pistache&type=fork&count=true&size=large" frameborder="0" scrolling="0" width="158px" height="30px"></iframe>
</div>
</div>
</header>
<div class="page-content wc-container">
<div class="post">
<h1>Pistache</h1>
<div class="post">
<p><code>Pistache</code> is a C++ REST framework written by <a href="https://github.com/oktal">Mathieu Stefani</a> at <a href="http://datacratic.com">Datacratic</a>.
It is written in pure C++14 and provides a low-level HTTP abstraction.</p>
<p><code>Pistache</code> provides both an HTTP client and server that can be used to create and query complex web and REST APIs.</p>
<p>It’s completly free and Apache-licensed.</p>
<h2 id="modern-api">Modern API</h2>
<p>Playing with Pistache and its modern API is fun and easy</p>
<figure class="highlight"><pre><code class="language-cpp" data-lang="cpp"><span class="k">struct</span> <span class="nl">HelloHandler</span> <span class="p">:</span> <span class="k">public</span> <span class="n">Http</span><span class="o">::</span><span class="n">Handler</span> <span class="p">{</span>
<span class="kt">void</span> <span class="n">onRequest</span><span class="p">(</span><span class="k">const</span> <span class="n">Http</span><span class="o">::</span><span class="n">Request</span><span class="o">&amp;</span> <span class="n">req</span><span class="p">,</span> <span class="n">Http</span><span class="o">::</span><span class="n">ResponseWriter</span> <span class="n">response</span><span class="p">)</span> <span class="p">{</span>
<span class="n">response</span><span class="p">.</span><span class="n">send</span><span class="p">(</span><span class="n">Http</span><span class="o">::</span><span class="n">Code</span><span class="o">::</span><span class="n">Ok</span><span class="p">,</span> <span class="s">&quot;Hello, World&quot;</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">};</span>
<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span>
<span class="n">Http</span><span class="o">::</span><span class="n">listenAndServe</span><span class="o">&lt;</span><span class="n">HelloHandler</span><span class="o">&gt;</span><span class="p">(</span><span class="s">&quot;*:9080&quot;</span><span class="p">);</span>
<span class="p">}</span></code></pre></figure>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">curl http://127.0.0.1:9080
Hello, World</code></pre></figure>
<h2 id="whats-in-the-box">What’s in the box</h2>
<ul>
<li>A multi-threaded http server to build your APIs</li>
<li>An asynchronous http client to request APIS</li>
<li>An HTTP router to dispatch requests to C++ functions</li>
<li>A REST description DSL to easily define your APIs</li>
<li>Type-safe headers and MIME types implementation</li>
</ul>
<h2 id="use-it">Use it</h2>
<ul>
<li>Clone it on <a href="http://github.com/oktal/pistache">github</a></li>
<li>Start with the <a href="quickstart">quickstart</a></li>
<li>Read the full user’s <a href="guide">guide</a></li>
<li>Have issues with it ? Fill an <a href="https://github.com/oktal/pistache/issues">issue</a></li>
</ul>
</div>
</div>
</div>
<footer class="main-footer">
<div class="wc-container">
<div class="column one">
<h6>Few more links</h6>
<ul class="menu">
</ul>
</div>
<div class="column two">
<h6>Follow me</h6>
<ul class="social-media">
<li>
<a title="oktal on Github"
href="https://github.com/oktal"
class="github wc-img-replace" target="_blank">Github</a>
</li>
</ul>
</div>
</div>
<p class="wc-container disclaimer">
Powered by <a href="http://jekyllrb.com" target="_blank">Jekyll</a>
</p>
</footer>
<script type="text/javascript">
/* To avoid render blocking css */
var cb = function() {
var l = document.createElement('link'); l.rel = 'stylesheet';
l.href = 'http://fonts.googleapis.com/css?family=Ubuntu+Mono&subset=latin';
var h = document.getElementsByTagName('head')[0]; h.parentNode.insertBefore(l, h);
};
var raf = requestAnimationFrame || mozRequestAnimationFrame ||
webkitRequestAnimationFrame || msRequestAnimationFrame;
if (raf) raf(cb);
else window.addEventListener('load', cb);
</script>
<!-- jQuery -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<!-- When no internet load JQuery from local -->
<script>window.jQuery || document.write('<script src="/assets/js/jquery.min.js"><\/script>')</script>
<!-- Site js -->
<script src="/assets/js/all.js"></script>
<!-- Google analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-xxxx-x']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>
# Dependencies
/node_modules
# Production
/build
# Generated files
.docusaurus
.cache-loader
# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Website
This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator.
## Installation
```console
yarn install
```
## Local Development
```console
yarn start
```
This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.
## Build
```console
yarn build
```
This command generates static content into the `build` directory and can be served using any static contents hosting service.
## Deployment
```console
GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
```
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
---
title: Asynchronous HTTP programming
---
Interfaces provided by Pistaches are _asynchronous_ and _non-blocking_. Asynchronous programming allows for code to continue executing even if the result of a given call is not available yet. Calls that provide an asynchronous interface are referred to _asynchronous calls_.
An example of such a call is the `send()` function provided by the `ResponseWriter` interface. This function returns the number of bytes written to the socket file descriptor associated to the connection. However, instead of returning directly the value to the caller and thus blocking the caller, it wraps the value into a component called a `Promise`.
A `Promise` is the Pistache’s implementation of the [Promises/A+](https://promisesaplus.com) standard available in many JavaScript implementations. Simply put, during an asynchronous call, a `Promise` separates the launch of an asynchronous operation from the retrieval of its result. While the asynchronous might still be running, a `Promise<T>` is directly returned to the caller to retrieve the final result when it becomes available. A so called continuation can be attach to a `Promise` to execute a callback when the result becomes available (when the `Promise` has been resolved or fulfilled).
```cpp
auto res = response.send(Http::Code::Ok, "Hello World");
res.then(
[](ssize_t bytes) { std::cout << bytes << " bytes have been sent\n" },
Async::NoExcept
);
```
The `then()` member is used to attach a callback to the `Promise`. The first argument is a callable that will be called when the `Promise` has been **succesfully** resolved. If, for some reason, an error occurs during the asynchronous operation, a `Promise` can be **rejected** and will then fail. In this case, the second callable will be called. `Async::NoExcept` is a special callback that will call [`std::terminate()`](https://en.cppreference.com/w/cpp/error/terminate) if the promise failed. This is the equivalent of the `noexcept` keyword.
Other generic callbacks can also be used in this case:
- `Async::IgnoreException` will simply ignore the exception and let the program continue
- `Async::Throw` will "rethrow" the exception up to an eventual promise call-chain. This has the same effect than the `throw` keyword, except that it is suitable for promises
Exceptions in promises callbacks are propagated through an `exception_ptr`. Promises can also be chained together to create a whole asynchronous pipeline:
```cpp
auto fetchOp = fetchDatabase();
fetchOp
.then(
[](const User& user) { return fetchUserInfo(user); },
Async::Throw)
.then(
[](const UserInfo& info) { std::cout << "User name = " << info.name << std::endl; },
[](exception_ptr ptr) { std::cout << "An exception occured during user retrieval" << std::endl;}
);
```
Line 5 will propagate the exception if `fetchDatabase()` failed and rejected the promise.
---
id: doc1
title: Style Guide
sidebar_label: Style Guide
---
You can write content using [GitHub-flavored Markdown syntax](https://github.github.com/gfm/).
## Markdown Syntax
To serve as an example page when styling markdown based Docusaurus sites.
## Headers
# H1 - Create the best documentation
## H2 - Create the best documentation
### H3 - Create the best documentation
#### H4 - Create the best documentation
##### H5 - Create the best documentation
###### H6 - Create the best documentation
---
## Emphasis
Emphasis, aka italics, with *asterisks* or _underscores_.
Strong emphasis, aka bold, with **asterisks** or __underscores__.
Combined emphasis with **asterisks and _underscores_**.
Strikethrough uses two tildes. ~~Scratch this.~~
---
## Lists
1. First ordered list item
1. Another item
- Unordered sub-list.
1. Actual numbers don't matter, just that it's a number
1. Ordered sub-list
1. And another item.
* Unordered list can use asterisks
- Or minuses
+ Or pluses
---
## Links
[I'm an inline-style link](https://www.google.com/)
[I'm an inline-style link with title](https://www.google.com/ "Google's Homepage")
[I'm a reference-style link][arbitrary case-insensitive reference text]
[You can use numbers for reference-style link definitions][1]
Or leave it empty and use the [link text itself].
URLs and URLs in angle brackets will automatically get turned into links. http://www.example.com/ or <http://www.example.com/> and sometimes example.com (but not on GitHub, for example).
Some text to show that the reference links can follow later.
[arbitrary case-insensitive reference text]: https://www.mozilla.org/
[1]: http://slashdot.org/
[link text itself]: http://www.reddit.com/
---
## Images
Here's our logo (hover to see the title text):
Inline-style: ![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png 'Logo Title Text 1')
Reference-style: ![alt text][logo]
[logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png 'Logo Title Text 2'
Images from any folder can be used by providing path to file. Path should be relative to markdown file.
![img](../static/img/logo.svg)
---
## Code
```javascript
var s = 'JavaScript syntax highlighting';
alert(s);
```
```python
s = "Python syntax highlighting"
print(s)
```
```
No language indicated, so no syntax highlighting.
But let's throw in a <b>tag</b>.
```
```js {2}
function highlightMe() {
console.log('This line can be highlighted!');
}
```
---
## Tables
Colons can be used to align columns.
| Tables | Are | Cool |
| ------------- | :-----------: | -----: |
| col 3 is | right-aligned | \$1600 |
| col 2 is | centered | \$12 |
| zebra stripes | are neat | \$1 |
There must be at least 3 dashes separating each header cell. The outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown.
| Markdown | Less | Pretty |
| -------- | --------- | ---------- |
| _Still_ | `renders` | **nicely** |
| 1 | 2 | 3 |
---
## Blockquotes
> Blockquotes are very handy in email to emulate reply text. This line is part of the same quote.
Quote break.
> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can _put_ **Markdown** into a blockquote.
---
## Line Breaks
Here's a line for us to start with.
This line is separated from the one above by two newlines, so it will be a _separate paragraph_.
This line is also a separate paragraph, but... This line is only separated by a single newline, so it's a separate line in the _same paragraph_.
---
## Admonitions
:::note
This is a note
:::
:::tip
This is a tip
:::
:::important
This is important
:::
:::caution
This is a caution
:::
:::warning
This is a warning
:::
---
title: Headers
---
## Overview
Inspired by the [Rust](https://www.rust-lang.org) eco-system and [Hyper](https://hyper.rs), HTTP headers are represented as _type-safe_ plain objects. Instead of representing headers as a pair of `(key: string, value: value)`, the choice has been made to represent them as plain objects. This greatly reduces the risk of typo errors that can not catched by the compiler with plain old strings.
Instead, objects give the compiler the ability to catch errors directly at compile-time, as the user can not add or request a header through its name: it has to use the whole **type**. Types being enforced at compile-time, it helps reducing common typo errors.
With Pistache, each HTTP Header is a class that inherits from the `Http::Header` base class and use the `NAME()` macro to define the name of the header. List of all headers inside an HTTP request or response are stored inside an internal [`std::unordered_map`](https://en.cppreference.com/w/cpp/container/unordered_map), wrapped in an `Header::Collection` class. Invidual headers can be retrieved or added to this object through the whole type of the header:
```cpp
auto headers = request.headers();
auto ct = headers.get<Http::Header::ContentType>();
```
`get<H>` will return a `std::shared_ptr<H>` where `H: Header` (`H` inherits from `Header`). If the header does not exist, `get<H>` will throw an exception. `tryGet<H>` provides a non-throwing alternative that, instead, returns a null pointer.
:::note Built-in headers
Headers provided by Pistache live in the `Http::Header` namespace
:::
## Defining your own header
Common headers defined by the HTTP RFC ([RFC2616](https://pretty-rfc.herokuapp.com/RFC2616)) are already implemented and available. However, some APIs might define extra headers that do not exist in Pistache. To support your own header types, you can define and register your own HTTP Header by first declaring a class that inherits the `Http::Header` class:
```cpp
class XProtocolVersion : public Http::Header {
};
```
Since every header has a name, the `NAME()` macro must be used to name the header properly:
```cpp
class XProtocolVersion : public Http::Header {
NAME("X-Protocol-Version")
};
```
The `Http::Header` base class provides two virtual methods that you must override in your own implementation:
```cpp
void parse(const std::string& data);
```
This function is used to parse the header from the string representation. Alternatively, to avoid allocating memory for the string representation, a _raw_ version can be used:
:::note Note to the Pistache team
Why not to use a `std::string_view` instead?
:::
```cpp
void parseRaw(const char* str, size_t len);
```
`str` will directly point to the header buffer from the raw http stream. The len parameter is the total length of the header's value.
```cpp
void write(std::ostream& stream) const
```
When writing the response back to the client, the `write` function is used to serialize the header into the network buffer.
Let’s combine these functions together to finalize the implementation of our previously declared header:
```cpp
class XProtocolVersion : public Http::Header {
public:
NAME("X-Protocol-Version")
XProtocolVersion()
: minor(-1)
, major(-1)
{ }
void parse(const std::string& data) {
auto pos = data.find('.');
if (pos != std::string::npos) {
minor = std::stoi(data.substr(0, pos));
major = std::stoi(data.substr(pos + 1));
}
}
void write(std::ostream& os) const {
os << minor << "." << major;
}
private:
int minor;
int major;
};
```
And that’s it. Now all we have to do is registering the header to the registry system:
```cpp
Header::Registry::registerHeader<XProtocolVersion>();
```
:::note Header instantation
You should always provide a default constructor for your header so that it can be instantiated by the registry system
:::
Now, the `XProtocolVersion` can be retrieved and added like any other header in the `Header::Collection` class.
:::note Unknown headers
Headers that are not known to the registry system are stored as a raw pair of strings in the `Collection` class. `getRaw()` can be used to retrieve a raw header:
```cpp
auto myHeader = request.headers().getRaw("x-raw-header");
myHeader.name() // x-raw-header
myHeader.value() // returns the value of the header as a string
```
:::
## MIME types
[MIME Types](https://en.wikipedia.org/wiki/Media_type) (or Media Type) are also fully typed. Such types are for example used in an HTTP request or response to describe the data contained in the body of the message (`Content-Type` header, …) and are composed of a _type_, _subtype_, and optional _suffix_ and parameters.
MIME Types are represented by the `Mime::MediaType` class, implemented in the `mime.h` header. A MIME type can be directly constructed from a string:
```cpp
auto mime = Http::Mime::MediaType::fromString("application/json");
```
However, to enforce type-safety, common types are all represented as enumerations:
```cpp
Http::Mime::MediaType m1(Http::Mime::Type::Application, Http::Mime::Subtype::Json);
```
To avoid such a typing pain, a `MIME` macro is also provided:
```cpp
auto m1 = MIME(Application, Json);
```
For suffix MIMEs, use the special `MIME3` macro:
```cpp
auto m1 = MIME3(Application, Json, Zip);
```
If you like typing, you can also use the long form:
```cpp
Http::Mime::MediaType m1(Http::Mime::Type::Application, Http::Mime::Subtype::Json, Http::Mime::Suffix::Zip);
```
The `toString()` function can be used to get the string representation of a given MIME type:
```cpp
auto m1 = MIME(Text, Html);
m1.toString(); // text/html
```
---
id: http-handler
title: HTTP handler
slug: /
---
Requests that are received by Pistache are handled by a special class called `Http::Handler`. This class declares a bunch of virtual methods that can be overriden to handle special events that occur on the socket and/or connection.
The `onRequest()` function must be overriden. This function is called whenever Pistache received data and correctly parsed it as an HTTP request.
```cpp
virtual void onRequest(const Http::Request& request, Http::ResponseWriter response);
```
The first argument is an object of type `Http::Request` representing the request itself. It contains a bunch of informations including:
- The resource associated to the request
- The query parameters
- The headers
- The body of the request
The `Request` object gives a read-only access to these informations. You can access them through a couple of getters but can not modify them. An HTTP request is **immutable**.
## Sending a response
`ResponseWriter` is an object from which the final HTTP response is sent to the client. The `onRequest()` function does not return anything (`void`). Instead, the response is sent through the `ResponseWriter` class. This class provides a bunch of `send()` function overloads to send the response:
```cpp
Async::Promise<ssize_t> send(Code code);
```
You can use this overload to send a response with an empty body and a given HTTP Code (e.g `Http::Code::Ok`)
```cpp
Async::Promise<ssize_t> send(
Code code,
const std::string& body,
const Mime::MediaType &mime = Mime::MediaType()
);
```
This overload can be used to send a response with static, fixed-size content (body). A MIME type can also be specified, which will be sent through the `Content-Type` header.
```cpp
template<size_t N>
Async::Promise<ssize_t> send(
Code code,
const char (&arr)[N],
const Mime::MediaType& mime = Mime::MediaType()
);
```
This version can also be used to send a fixed-size response with a body except that it does not need to construct a string (no memory is allocated). The size of the content is directly deduced by the compiler. This version only works with raw string literals.
These functions are asynchronous, meaning that they do not return a plain old `ssize_t` value indicating the number of bytes being sent, but instead a `Promise` that will be fulfilled later on. See the next section for more details on asynchronous programming with Pistache.
## Response streaming
Sometimes, content that is to be sent back to the user can not be known in advance, thus the length can not be determined in advance. For that matter, the HTTP specification defines a special data-transfer mechanism called [chunked encoding](https://tools.ietf.org/html/rfc7230#section-4.1) where data is sent in a series of _chunks_. This mechanism uses the `Transfer-Encoding` HTTP header in place of the `Content-Length` one.
To stream content, Pistache provides a special `ResponseStream` class. To get a `ResponseStream` from a `ResponseWriter`, call the `stream()` member function:
```cpp
auto stream = response.stream(Http::Code::Ok);
```
To initate a stream, you have to pass the HTTP status code to the stream function (here `Http::Code::Ok` or `HTTP 200`). The `ResponseStream` class provides an `iostream` like interface that overloads the `<<` operator.
```cpp
stream << "PO"
stream << "NG"
```
The first line will write a chunk of size 2 with the content _PO_ to the stream's buffer. The second line will write a second chunk of size 2 with the content _NG_. To end the stream and flush the content, use the special `ends` marker:
```cpp
stream << ends
```
The `ends` marker will write the last chunk of size 0 and send the final data over the network. To simply flush the stream's buffer without ending the stream, you can use the `flush` marker:
```cpp
stream << flush
```
:::caution Headers writing
After starting a stream, headers become immutable. They must be written to the response before creating a `ResponseStream`:
```cpp
response.headers()
.add<Header::Server>("lys")
.add<Header::ContentType>(MIME(Text, Plain));
auto stream = response.stream();
stream << "PO" << "NG" << ends;
```
:::
## Static file serving
In addition to text content serving, Pistache provides a way to serve static files through the `Http::serveFile` function:
```cpp
if (request.resource() == "/doc" && request.method == Http::Method::Get) {
Http::serveFile(response, "README.md");
}
```
:::note Return value
`serveFile` also returns a `Promise` representing the total number of bytes being sent to the wire
:::
## Controlling timeout
Sometimes, you might require to timeout after a certain amount of time. For example, if you are designing an HTTP API with soft real-time constraints, you will have a time constraint to send a response back to the client. That is why Pistache provides the ability to control the timeout on a per-request basis. To arm a timeout on a response, you can use the `timeoufterAfter()` member function directly on the `ResponseWriter` object:
```cpp
response.timeoutAfter(std::chrono::milliseconds(500));
```
This will trigger a timeout if a response has not been sent within 500 milliseconds. `timeoutAfter` accepts any kind of duration.
When a timeout triggers, the `onTimeout()` function from your handler will be called. By default, this method does nothing. If you want to handle your timeout properly, you should then override this function inside your own handler:
```cpp
void onTimeout(const Http::Request& request, Http::ResponseWriter writer) {
request.send(Http::Code::No_Content);
}
```
The `Request` object that is passed to the `onTimeout` is the exact same request that triggered the timeout. The `ResponseWriter` is a complete new writer object.
:::note ResponseWriter state
Since the `ResponseWriter` object is a complete new object, state is not preserved with the `ResponseWriter` from the `onRequest()` callback, which means that you will have to write the complete response again, including headers and cookies.
:::
---
title: Routing
---
HTTP routing consists of binding an HTTP route to a C++ callback. A special component called an HTTP router will be in charge of dispatching HTTP requests to the right C++ callback. A route is composed of an HTTP verb associated to a resource:
```javascript
GET /users/1
```
Here, `GET` is the verb and `/users/1` is the associated resource.
## HTTP methods
A bunch of HTTP methods (verbs) are supported by Pistache:
- _GET_: The `GET` method is used by the client (e.g browser) to retrieve a resource identified by an URI. For example, to retrieve an user identified by an id, a client will issue a `GET` to the `/users/:id` Request-URI.
- _POST_: the `POST` method is used to post or send new information to a certain resource. The server will then read and store the data associated to the request. `POST` is a common way of transmitting data from an HTML form. `POST` can also be used to create a new resource or update information of an existing resource. For example, to create a new user, a client will issue a `POST` to the `/users` path with the data of the user to create in its body.
- _PUT_: `PUT` is very similar to `POST` except that `PUT` is idempotent, meaning that two requests to the same Request-URI with the same identical content should have the same effect and should produce the same result.
- _DELETE_: the `DELETE` method is used to delete a resource associated to a given Request-URI. For example, to remove an user, a client might issue a `DELETE` call to the `/users/:id` Request-URI.
To sum up, `POST` and `PUT` are used to Create and/or Update, `GET` is used to Read and `DELETE` is used to Delete information.
module.exports = {
title: 'Pistache',
tagline: 'An elegant C++ REST framework.',
url: 'https://pistache.io',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
organizationName: 'pistacheio', // Usually your GitHub org/user name.
projectName: 'pistace', // Usually your repo name.
themeConfig: {
navbar: {
title: 'Pistache',
logo: {
alt: 'Pistache logo',
src: 'img/logo.png',
},
items: [
{
to: 'docs/',
activeBasePath: 'docs',
label: 'Docs',
position: 'left',
},
{
href: 'https://github.com/pistacheio/pistache',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'Style Guide',
to: 'docs/',
},
{
label: 'Second Doc',
to: 'docs/doc2/',
},
],
},
{
title: 'Community',
items: [
{
label: 'Stack Overflow',
href: 'https://stackoverflow.com/questions/tagged/pistache',
},
{
label: 'Discord',
href: 'https://discord.com/invite/pistacheio',
},
{
label: 'Twitter',
href: 'https://twitter.com/pistacheio',
},
],
},
{
title: 'More',
items: [
{
label: 'Blog',
to: 'blog',
},
{
label: 'GitHub',
href: 'https://github.com/pistacheio/pistache',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Pistache. Built by Tachi with <3 and Docusaurus.`,
},
},
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
editUrl:
'https://github.com/pistacheio/pistache/edit/master/pistache.io/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
},
],
],
};
{
"name": "pistache-io",
"version": "0.0.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"serve": "docusaurus serve",
"clear": "docusaurus clear"
},
"dependencies": {
"@docusaurus/core": "2.0.0-alpha.70",
"@docusaurus/preset-classic": "2.0.0-alpha.70",
"@mdx-js/react": "^1.6.21",
"clsx": "^1.1.1",
"react": "^16.8.4",
"react-dom": "^16.8.4"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
\ No newline at end of file
module.exports = {
someSidebar: {
Pistache: ['http-handler', 'asynchronous-http-programming', 'headers', 'routing'],
},
};
/* stylelint-disable docusaurus/copyright-header */
/**
* Any CSS included here will be global. The classic template
* bundles Infima by default. Infima is a CSS framework designed to
* work well for content-centric websites.
*/
/* You can override the default Infima variables here. */
:root {
--ifm-color-primary: #25c2a0;
--ifm-color-primary-dark: rgb(33, 175, 144);
--ifm-color-primary-darker: rgb(31, 165, 136);
--ifm-color-primary-darkest: rgb(26, 136, 112);
--ifm-color-primary-light: rgb(70, 203, 174);
--ifm-color-primary-lighter: rgb(102, 212, 189);
--ifm-color-primary-lightest: rgb(146, 224, 208);
--ifm-code-font-size: 95%;
}
.docusaurus-highlight-code-line {
background-color: rgb(72, 77, 91);
display: block;
margin: 0 calc(-1 * var(--ifm-pre-padding));
padding: 0 var(--ifm-pre-padding);
}
import React from 'react';
import clsx from 'clsx';
import Layout from '@theme/Layout';
import Link from '@docusaurus/Link';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import useBaseUrl from '@docusaurus/useBaseUrl';
import styles from './styles.module.css';
const features = [
{
title: 'Easy to Use',
imageUrl: 'img/undraw_docusaurus_mountain.svg',
description: (
<>
Docusaurus was designed from the ground up to be easily installed and
used to get your website up and running quickly.
</>
),
},
{
title: 'Focus on What Matters',
imageUrl: 'img/undraw_docusaurus_tree.svg',
description: (
<>
Docusaurus lets you focus on your docs, and we&apos;ll do the chores. Go
ahead and move your docs into the <code>docs</code> directory.
</>
),
},
{
title: 'Powered by React',
imageUrl: 'img/undraw_docusaurus_react.svg',
description: (
<>
Extend or customize your website layout by reusing React. Docusaurus can
be extended while reusing the same header and footer.
</>
),
},
];
function Feature({imageUrl, title, description}) {
const imgUrl = useBaseUrl(imageUrl);
return (
<div className={clsx('col col--4', styles.feature)}>
{imgUrl && (
<div className="text--center">
<img className={styles.featureImage} src={imgUrl} alt={title} />
</div>
)}
<h3>{title}</h3>
<p>{description}</p>
</div>
);
}
function Home() {
const context = useDocusaurusContext();
const {siteConfig = {}} = context;
return (
<Layout
title={`Hello from ${siteConfig.title}`}
description="Description will go into a meta tag in <head />">
<header className={clsx('hero hero--primary', styles.heroBanner)}>
<div className="container">
<h1 className="hero__title">{siteConfig.title}</h1>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<div className={styles.buttons}>
<Link
className={clsx(
'button button--outline button--secondary button--lg',
styles.getStarted,
)}
to={useBaseUrl('docs/')}>
Get Started
</Link>
</div>
</div>
</header>
<main>
{features && features.length > 0 && (
<section className={styles.features}>
<div className="container">
<div className="row">
{features.map((props, idx) => (
<Feature key={idx} {...props} />
))}
</div>
</div>
</section>
)}
</main>
</Layout>
);
}
export default Home;
/* stylelint-disable docusaurus/copyright-header */
/**
* CSS files with the .module.css suffix will be treated as CSS modules
* and scoped locally.
*/
.heroBanner {
padding: 4rem 0;
text-align: center;
position: relative;
overflow: hidden;
}
@media screen and (max-width: 966px) {
.heroBanner {
padding: 2rem;
}
}
.buttons {
display: flex;
align-items: center;
justify-content: center;
}
.features {
display: flex;
align-items: center;
padding: 2rem 0;
width: 100%;
}
.featureImage {
height: 200px;
width: 200px;
}
<svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path fill="#FFF" d="M99 52h84v34H99z"/><path d="M23 163c-7.398 0-13.843-4.027-17.303-10A19.886 19.886 0 0 0 3 163c0 11.046 8.954 20 20 20h20v-20H23z" fill="#3ECC5F"/><path d="M112.98 57.376L183 53V43c0-11.046-8.954-20-20-20H73l-2.5-4.33c-1.112-1.925-3.889-1.925-5 0L63 23l-2.5-4.33c-1.111-1.925-3.889-1.925-5 0L53 23l-2.5-4.33c-1.111-1.925-3.889-1.925-5 0L43 23c-.022 0-.042.003-.065.003l-4.142-4.141c-1.57-1.571-4.252-.853-4.828 1.294l-1.369 5.104-5.192-1.392c-2.148-.575-4.111 1.389-3.535 3.536l1.39 5.193-5.102 1.367c-2.148.576-2.867 3.259-1.296 4.83l4.142 4.142c0 .021-.003.042-.003.064l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 53l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 63l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 73l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 83l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 93l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 103l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 113l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 123l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 133l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 143l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 153l-4.33 2.5c-1.925 1.111-1.925 3.889 0 5L23 163c0 11.046 8.954 20 20 20h120c11.046 0 20-8.954 20-20V83l-70.02-4.376A10.645 10.645 0 0 1 103 68c0-5.621 4.37-10.273 9.98-10.624" fill="#3ECC5F"/><path fill="#3ECC5F" d="M143 183h30v-40h-30z"/><path d="M193 158c-.219 0-.428.037-.639.064-.038-.15-.074-.301-.116-.451A5 5 0 0 0 190.32 148a4.96 4.96 0 0 0-3.016 1.036 26.531 26.531 0 0 0-.335-.336 4.955 4.955 0 0 0 1.011-2.987 5 5 0 0 0-9.599-1.959c-.148-.042-.297-.077-.445-.115.027-.211.064-.42.064-.639a5 5 0 0 0-5-5 5 5 0 0 0-5 5c0 .219.037.428.064.639-.148.038-.297.073-.445.115a4.998 4.998 0 0 0-9.599 1.959c0 1.125.384 2.151 1.011 2.987-3.717 3.632-6.031 8.693-6.031 14.3 0 11.046 8.954 20 20 20 9.339 0 17.16-6.41 19.361-15.064.211.027.42.064.639.064a5 5 0 0 0 5-5 5 5 0 0 0-5-5" fill="#44D860"/><path fill="#3ECC5F" d="M153 123h30v-20h-30z"/><path d="M193 115.5a2.5 2.5 0 1 0 0-5c-.109 0-.214.019-.319.032-.02-.075-.037-.15-.058-.225a2.501 2.501 0 0 0-.963-4.807c-.569 0-1.088.197-1.508.518a6.653 6.653 0 0 0-.168-.168c.314-.417.506-.931.506-1.494a2.5 2.5 0 0 0-4.8-.979A9.987 9.987 0 0 0 183 103c-5.522 0-10 4.478-10 10s4.478 10 10 10c.934 0 1.833-.138 2.69-.377a2.5 2.5 0 0 0 4.8-.979c0-.563-.192-1.077-.506-1.494.057-.055.113-.111.168-.168.42.321.939.518 1.508.518a2.5 2.5 0 0 0 .963-4.807c.021-.074.038-.15.058-.225.105.013.21.032.319.032" fill="#44D860"/><path d="M63 55.5a2.5 2.5 0 0 1-2.5-2.5c0-4.136-3.364-7.5-7.5-7.5s-7.5 3.364-7.5 7.5a2.5 2.5 0 1 1-5 0c0-6.893 5.607-12.5 12.5-12.5S65.5 46.107 65.5 53a2.5 2.5 0 0 1-2.5 2.5" fill="#000"/><path d="M103 183h60c11.046 0 20-8.954 20-20V93h-60c-11.046 0-20 8.954-20 20v70z" fill="#FFFF50"/><path d="M168.02 124h-50.04a1 1 0 1 1 0-2h50.04a1 1 0 1 1 0 2m0 20h-50.04a1 1 0 1 1 0-2h50.04a1 1 0 1 1 0 2m0 20h-50.04a1 1 0 1 1 0-2h50.04a1 1 0 1 1 0 2m0-49.814h-50.04a1 1 0 1 1 0-2h50.04a1 1 0 1 1 0 2m0 19.814h-50.04a1 1 0 1 1 0-2h50.04a1 1 0 1 1 0 2m0 20h-50.04a1 1 0 1 1 0-2h50.04a1 1 0 1 1 0 2M183 61.611c-.012 0-.022-.006-.034-.005-3.09.105-4.552 3.196-5.842 5.923-1.346 2.85-2.387 4.703-4.093 4.647-1.889-.068-2.969-2.202-4.113-4.46-1.314-2.594-2.814-5.536-5.963-5.426-3.046.104-4.513 2.794-5.807 5.167-1.377 2.528-2.314 4.065-4.121 3.994-1.927-.07-2.951-1.805-4.136-3.813-1.321-2.236-2.848-4.75-5.936-4.664-2.994.103-4.465 2.385-5.763 4.4-1.373 2.13-2.335 3.428-4.165 3.351-1.973-.07-2.992-1.51-4.171-3.177-1.324-1.873-2.816-3.993-5.895-3.89-2.928.1-4.399 1.97-5.696 3.618-1.232 1.564-2.194 2.802-4.229 2.724a1 1 0 0 0-.072 2c3.017.101 4.545-1.8 5.872-3.487 1.177-1.496 2.193-2.787 4.193-2.855 1.926-.082 2.829 1.115 4.195 3.045 1.297 1.834 2.769 3.914 5.731 4.021 3.103.104 4.596-2.215 5.918-4.267 1.182-1.834 2.202-3.417 4.15-3.484 1.793-.067 2.769 1.35 4.145 3.681 1.297 2.197 2.766 4.686 5.787 4.796 3.125.108 4.634-2.62 5.949-5.035 1.139-2.088 2.214-4.06 4.119-4.126 1.793-.042 2.728 1.595 4.111 4.33 1.292 2.553 2.757 5.445 5.825 5.556l.169.003c3.064 0 4.518-3.075 5.805-5.794 1.139-2.41 2.217-4.68 4.067-4.773v-2z" fill="#000"/><path fill="#3ECC5F" d="M83 183h40v-40H83z"/><path d="M143 158c-.219 0-.428.037-.639.064-.038-.15-.074-.301-.116-.451A5 5 0 0 0 140.32 148a4.96 4.96 0 0 0-3.016 1.036 26.531 26.531 0 0 0-.335-.336 4.955 4.955 0 0 0 1.011-2.987 5 5 0 0 0-9.599-1.959c-.148-.042-.297-.077-.445-.115.027-.211.064-.42.064-.639a5 5 0 0 0-5-5 5 5 0 0 0-5 5c0 .219.037.428.064.639-.148.038-.297.073-.445.115a4.998 4.998 0 0 0-9.599 1.959c0 1.125.384 2.151 1.011 2.987-3.717 3.632-6.031 8.693-6.031 14.3 0 11.046 8.954 20 20 20 9.339 0 17.16-6.41 19.361-15.064.211.027.42.064.639.064a5 5 0 0 0 5-5 5 5 0 0 0-5-5" fill="#44D860"/><path fill="#3ECC5F" d="M83 123h40v-20H83z"/><path d="M133 115.5a2.5 2.5 0 1 0 0-5c-.109 0-.214.019-.319.032-.02-.075-.037-.15-.058-.225a2.501 2.501 0 0 0-.963-4.807c-.569 0-1.088.197-1.508.518a6.653 6.653 0 0 0-.168-.168c.314-.417.506-.931.506-1.494a2.5 2.5 0 0 0-4.8-.979A9.987 9.987 0 0 0 123 103c-5.522 0-10 4.478-10 10s4.478 10 10 10c.934 0 1.833-.138 2.69-.377a2.5 2.5 0 0 0 4.8-.979c0-.563-.192-1.077-.506-1.494.057-.055.113-.111.168-.168.42.321.939.518 1.508.518a2.5 2.5 0 0 0 .963-4.807c.021-.074.038-.15.058-.225.105.013.21.032.319.032" fill="#44D860"/><path d="M143 41.75c-.16 0-.33-.02-.49-.05a2.52 2.52 0 0 1-.47-.14c-.15-.06-.29-.14-.431-.23-.13-.09-.259-.2-.38-.31-.109-.12-.219-.24-.309-.38s-.17-.28-.231-.43a2.619 2.619 0 0 1-.189-.96c0-.16.02-.33.05-.49.03-.16.08-.31.139-.47.061-.15.141-.29.231-.43.09-.13.2-.26.309-.38.121-.11.25-.22.38-.31.141-.09.281-.17.431-.23.149-.06.31-.11.47-.14.32-.07.65-.07.98 0 .159.03.32.08.47.14.149.06.29.14.43.23.13.09.259.2.38.31.11.12.22.25.31.38.09.14.17.28.23.43.06.16.11.31.14.47.029.16.05.33.05.49 0 .66-.271 1.31-.73 1.77-.121.11-.25.22-.38.31-.14.09-.281.17-.43.23a2.565 2.565 0 0 1-.96.19m20-1.25c-.66 0-1.3-.27-1.771-.73a3.802 3.802 0 0 1-.309-.38c-.09-.14-.17-.28-.231-.43a2.619 2.619 0 0 1-.189-.96c0-.66.27-1.3.729-1.77.121-.11.25-.22.38-.31.141-.09.281-.17.431-.23.149-.06.31-.11.47-.14.32-.07.66-.07.98 0 .159.03.32.08.47.14.149.06.29.14.43.23.13.09.259.2.38.31.459.47.73 1.11.73 1.77 0 .16-.021.33-.05.49-.03.16-.08.32-.14.47-.07.15-.14.29-.23.43-.09.13-.2.26-.31.38-.121.11-.25.22-.38.31-.14.09-.281.17-.43.23a2.565 2.565 0 0 1-.96.19" fill="#000"/></g></svg>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment