adding NotAuthorized HTTP response code

This commit is contained in:
Daniel Larimer 2014-04-22 10:22:17 -04:00
parent cd34f696ce
commit e36ccb3cfd
3 changed files with 8 additions and 2 deletions

View file

@ -1,9 +1,9 @@
#pragma once
#include <fc/variant.hpp>
#include <fc/filesystem.hpp>
namespace fc
{
class path;
class ostream;
class buffered_istream;
@ -54,7 +54,7 @@ namespace fc
}
template<typename T>
static void save_to_file( const T& v, const string& p, bool pretty = true )
static void save_to_file( const T& v, const std::string& p, bool pretty = true )
{
save_to_file( variant(v), fc::path(p), pretty );
}

View file

@ -27,6 +27,11 @@ struct unsigned_int {
friend bool operator>=( const unsigned_int& i, const unsigned_int& v ) { return v >= i.value; }
};
/**
* @brief serializes a 32 bit signed interger in as few bytes as possible
*
* Uses the google protobuf algorithm for seralizing signed numbers
*/
struct signed_int {
signed_int( int32_t v = 0 ):value(v){}
operator int32_t()const { return value; }

View file

@ -25,6 +25,7 @@ namespace fc {
enum status_code {
OK = 200,
RecordCreated = 201,
NotAuthorized = 401,
NotFound = 404,
Found = 302,
InternalServerError = 500