typo in post(), doc updated
This commit is contained in:
parent
edd09f9d7b
commit
26e06e42a1
|
@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 3.7)
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
project (mastodon-cpp
|
project (mastodon-cpp
|
||||||
VERSION 0.2.0
|
VERSION 0.2.1
|
||||||
LANGUAGES CXX
|
LANGUAGES CXX
|
||||||
)
|
)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -fPIC")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -fPIC")
|
||||||
|
|
|
@ -7,7 +7,7 @@ All versions below 1.0.0 (SOVERSION 0) are considered insecure, unstable and can
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
* Tested OS: Linux
|
* Tested OS: Linux
|
||||||
* C++ compiler (tested: gcc 6.4)
|
* C++ compiler (tested: gcc 6.4, clang 5.0)
|
||||||
* [cmake](https://cmake.org/) (tested: 3.9.6)
|
* [cmake](https://cmake.org/) (tested: 3.9.6)
|
||||||
* [boost](http://www.boost.org/) (tested: 1.63.0)
|
* [boost](http://www.boost.org/) (tested: 1.63.0)
|
||||||
* Optional: [doxygen](https://www.stack.nl/~dimitri/doxygen/) (tested: 1.8.13)
|
* Optional: [doxygen](https://www.stack.nl/~dimitri/doxygen/) (tested: 1.8.13)
|
||||||
|
|
|
@ -36,7 +36,7 @@ const std::uint16_t API::post(const Mastodon::API::v1 &call,
|
||||||
|
|
||||||
switch (call)
|
switch (call)
|
||||||
{
|
{
|
||||||
case v1::accounts_id_follow:
|
case v1::apps:
|
||||||
strcall = "/api/v1/apps";
|
strcall = "/api/v1/apps";
|
||||||
break;
|
break;
|
||||||
case v1::domain_blocks:
|
case v1::domain_blocks:
|
||||||
|
|
|
@ -126,8 +126,11 @@ const std::uint16_t API::http::request_sync(const method &meth,
|
||||||
request_stream << "Accept: */*\r\n";
|
request_stream << "Accept: */*\r\n";
|
||||||
request_stream << "Connection: close\r\n";
|
request_stream << "Connection: close\r\n";
|
||||||
request_stream << "User-Agent: " << parent.get_useragent() << "\r\n";
|
request_stream << "User-Agent: " << parent.get_useragent() << "\r\n";
|
||||||
request_stream << "Authorization: Bearer "
|
if (!_access_token.empty())
|
||||||
<< _access_token << "\r\n";
|
{
|
||||||
|
request_stream << "Authorization: Bearer "
|
||||||
|
<< _access_token << "\r\n";
|
||||||
|
}
|
||||||
switch (meth)
|
switch (meth)
|
||||||
{
|
{
|
||||||
case http::method::GET:
|
case http::method::GET:
|
||||||
|
|
Reference in New Issue