mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-30 18:16:31 +03:00
Minor improvements on http requests and minor bug fix.
--HG-- branch : dev
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
#ifndef EE_MATH_BASE
|
||||
#define EE_MATH_BASE
|
||||
|
||||
#include <eepp/core.hpp>
|
||||
#include <eepp/math/ease.hpp>
|
||||
|
||||
#endif
|
||||
@@ -1,7 +1,8 @@
|
||||
#ifndef EE_MATHCINTERPOLATION_H
|
||||
#define EE_MATHCINTERPOLATION_H
|
||||
|
||||
#include <eepp/math/base.hpp>
|
||||
#include <eepp/core.hpp>
|
||||
#include <eepp/math/ease.hpp>
|
||||
#include <eepp/system/time.hpp>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#ifndef EE_MATHCWAYPOINTS_H
|
||||
#define EE_MATHCWAYPOINTS_H
|
||||
|
||||
#include <eepp/math/base.hpp>
|
||||
#include <eepp/core.hpp>
|
||||
#include <eepp/math/ease.hpp>
|
||||
#include <eepp/math/vector2.hpp>
|
||||
#include <eepp/system/time.hpp>
|
||||
#include <vector>
|
||||
|
||||
@@ -40,6 +40,9 @@ class EE_API Http : NonCopyable {
|
||||
Patch ///< The PATCH method is used to apply partial modifications to a resource.
|
||||
};
|
||||
|
||||
/** @return Method from a method name string. */
|
||||
static Method methodFromString( std::string methodString );
|
||||
|
||||
/** @brief Default constructor
|
||||
** This constructor creates a GET request, with the root
|
||||
** URI ("/") and an empty body.
|
||||
@@ -62,6 +65,20 @@ class EE_API Http : NonCopyable {
|
||||
** @param value Value of the field */
|
||||
void setField(const std::string& field, const std::string& value);
|
||||
|
||||
/** @brief Check if the request defines a field
|
||||
** This function uses case-insensitive comparisons.
|
||||
** @param field Name of the field to test
|
||||
** @return True if the field exists, false otherwise */
|
||||
bool hasField(const std::string& field) const;
|
||||
|
||||
/** @brief Get the value of a field
|
||||
** If the field @a field is not found in the response header,
|
||||
** the empty string is returned. This function uses
|
||||
** case-insensitive comparisons.
|
||||
** @param field Name of the field to get
|
||||
** @return Value of the field, or empty string if not found */
|
||||
const std::string& getField(const std::string& field) const;
|
||||
|
||||
/** @brief Set the request method
|
||||
** See the Method enumeration for a complete list of all
|
||||
** the availale methods.
|
||||
@@ -139,12 +156,6 @@ class EE_API Http : NonCopyable {
|
||||
** @return String containing the request, ready to be sent */
|
||||
std::string prepare() const;
|
||||
|
||||
/** @brief Check if the request defines a field
|
||||
** This function uses case-insensitive comparisons.
|
||||
** @param field Name of the field to test
|
||||
** @return True if the field exists, false otherwise */
|
||||
bool hasField(const std::string& field) const;
|
||||
|
||||
// Types
|
||||
typedef std::map<std::string, std::string> FieldTable;
|
||||
|
||||
@@ -228,6 +239,9 @@ class EE_API Http : NonCopyable {
|
||||
** @return Status code of the response */
|
||||
Status getStatus() const;
|
||||
|
||||
/** @brief Get the response status description */
|
||||
const char * getStatusDescription() const;
|
||||
|
||||
/** @brief Get the major HTTP version number of the response
|
||||
** @return Major HTTP version number
|
||||
** @see GetMinorHttpVersion */
|
||||
|
||||
Reference in New Issue
Block a user