typo in post(), doc updated

This commit is contained in:
tastytea 2018-01-26 00:24:00 +01:00
parent edd09f9d7b
commit 26e06e42a1
Signed by: tastytea
GPG Key ID: 59346E0EA35C67E5
4 changed files with 8 additions and 5 deletions

View File

@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 3.7)
include(GNUInstallDirs)
project (mastodon-cpp
VERSION 0.2.0
VERSION 0.2.1
LANGUAGES CXX
)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -fPIC")

View File

@ -7,7 +7,7 @@ All versions below 1.0.0 (SOVERSION 0) are considered insecure, unstable and can
## Dependencies
* 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)
* [boost](http://www.boost.org/) (tested: 1.63.0)
* Optional: [doxygen](https://www.stack.nl/~dimitri/doxygen/) (tested: 1.8.13)

View File

@ -36,7 +36,7 @@ const std::uint16_t API::post(const Mastodon::API::v1 &call,
switch (call)
{
case v1::accounts_id_follow:
case v1::apps:
strcall = "/api/v1/apps";
break;
case v1::domain_blocks:

View File

@ -126,8 +126,11 @@ const std::uint16_t API::http::request_sync(const method &meth,
request_stream << "Accept: */*\r\n";
request_stream << "Connection: close\r\n";
request_stream << "User-Agent: " << parent.get_useragent() << "\r\n";
request_stream << "Authorization: Bearer "
<< _access_token << "\r\n";
if (!_access_token.empty())
{
request_stream << "Authorization: Bearer "
<< _access_token << "\r\n";
}
switch (meth)
{
case http::method::GET: