File tree Expand file tree Collapse file tree 6 files changed +177
-0
lines changed Expand file tree Collapse file tree 6 files changed +177
-0
lines changed Original file line number Diff line number Diff line change 1+ #include < iostream>
2+ #include " http/veridic.hpp"
3+
4+ using std::cout;
5+
6+ int main (int argc, char const *argv[])
7+ {
8+ Veridic tasty;
9+ tasty.setUrl (" http://example.com/" ); // example url, this url not include endpoints etc
10+
11+
12+ // example fields
13+ POST fields = {
14+ " name=cookies" ,
15+ " id=11"
16+ };
17+
18+ // example headers
19+ Headers headers = {
20+ " location: colombia" ,
21+ " deeper: false"
22+ };
23+
24+ // example put
25+ auto res = tasty.custom (fields, headers," PUT" ," /user/verify" );
26+ auto res = tasty.custom (fields, headers, " PUT" );
27+
28+ auto res2 = tasty.custom (fields, " PUT" " /user/verify" );
29+ auto res3 = tasty.custom (fields, " PUT" );
30+
31+ cout << res;
32+
33+ return 0 ;
34+ }
Original file line number Diff line number Diff line change 1+ #include < iostream>
2+ #include " http/veridic.hpp"
3+
4+ using std::cout;
5+
6+ int main (int argc, char const *argv[])
7+ {
8+ Veridic tasty;
9+ tasty.setUrl (" http://example.com/" ); // example url, this url not include endpoints etc
10+
11+
12+ // example fields
13+ POST fields = {
14+ " id=my_unique_id"
15+ };
16+
17+ // example headers
18+ Headers headers = {
19+ " location: colombia" ,
20+ " deeper: false"
21+ };
22+
23+ // example delete
24+ auto res = tasty.delete (fields, headers, " /user/verify" );
25+ auto res = tasty.delete (fields, headers);
26+ auto res2 = tasty.delete (fields, " /user/verify" );
27+ auto res3 = tasty.delete (fields);
28+
29+ cout << res;
30+
31+ return 0 ;
32+ }
Original file line number Diff line number Diff line change 1+ #include < iostream>
2+ #include " http/veridic.hpp"
3+
4+ using std::cout;
5+
6+ int main (int argc, char const *argv[])
7+ {
8+ Veridic tasty;
9+
10+ tasty.setUrl (" http://example.com/" );
11+ auto res = tasty.get ();
12+
13+ cout << res;
14+
15+ return 0 ;
16+ }
Original file line number Diff line number Diff line change 1+ #include < iostream>
2+ #include " http/veridic.hpp"
3+
4+ using std::cout;
5+
6+ int main (int argc, char const *argv[])
7+ {
8+ Veridic tasty;
9+
10+ tasty.setUrl (" http://example.com/" );
11+
12+ GET fields = {
13+ " name=kevin" ,
14+ " mail=kevinlevin@gmail.com" ,
15+ " tasty=true"
16+ };
17+
18+ auto res = tasty.get (fields, " /user/verify" );
19+ auto res2 = tasty.get (fields);
20+ auto res3 = tasty.get ();
21+
22+ cout << res;
23+
24+ return 0 ;
25+ }
Original file line number Diff line number Diff line change 1+ #include < iostream>
2+ #include " http/veridic.hpp"
3+
4+ using std::cout;
5+
6+ int main (int argc, char const *argv[])
7+ {
8+ Veridic tasty;
9+ tasty.setUrl (" http://example.com/" ); // example url, this url not include endpoints etc
10+
11+
12+ // example fields
13+ POST fields = {
14+ " choes-Size=3" ,
15+ " cookies-size=4" ,
16+ " location=polo_norte" ,
17+ " isHuman=false"
18+ };
19+
20+ // example headers
21+ Headers headers = {
22+ " cookies-size: 4" ,
23+ " isHuman: false" ,
24+ " location: colombia" ,
25+ " deeper: false"
26+ };
27+
28+ // example post
29+ auto res = tasty.post (fields, headers, " /user/verify" );
30+ auto res = tasty.post (fields, headers);
31+ auto res2 = tasty.pos (fields, " /user/verify" );
32+ auto res3 = tasty.pos (fields);
33+
34+ cout << res;
35+
36+ return 0 ;
37+ }
Original file line number Diff line number Diff line change 1+ #include < iostream>
2+ #include " http/veridic.hpp"
3+
4+ using std::cout;
5+
6+ int main (int argc, char const *argv[])
7+ {
8+ Veridic tasty;
9+ tasty.setUrl (" http://example.com/" ); // example url, this url not include endpoints etc
10+
11+
12+ // example fields
13+ POST fields = {
14+ " name=cookies" ,
15+ " id=11"
16+ };
17+
18+ // example headers
19+ Headers headers = {
20+ " location: colombia" ,
21+ " deeper: false"
22+ };
23+
24+ // example put
25+ auto res = tasty.put (fields, headers, " /user/verify" );
26+ auto res = tasty.put (fields, headers);
27+ auto res2 = tasty.put (fields, " /user/verify" );
28+ auto res3 = tasty.put (fields);
29+
30+ cout << res;
31+
32+ return 0 ;
33+ }
You can’t perform that action at this time.
0 commit comments