po
This commit is contained in:
@@ -5,7 +5,7 @@ project(Sockets)
|
||||
file(GLOB SOURCES src/*.cpp)
|
||||
|
||||
include_directories(include)
|
||||
add_library(${PROJECT_NAME} SHARED ${SOURCES} )
|
||||
add_library(${PROJECT_NAME} SHARED ${SOURCES} include/HttpClient.hpp)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "-pedantic -Wall -Wextra")
|
||||
|
||||
|
8
include/HttpHeaders.hpp
Normal file
8
include/HttpHeaders.hpp
Normal file
@@ -0,0 +1,8 @@
|
||||
//
|
||||
// Created by josh on 4/20/23.
|
||||
//
|
||||
|
||||
#ifndef SOCKETS_HTTPHEADERS_HPP
|
||||
#define SOCKETS_HTTPHEADERS_HPP
|
||||
|
||||
#endif //SOCKETS_HTTPHEADERS_HPP
|
1
include/HttpRequest.hpp
Normal file
1
include/HttpRequest.hpp
Normal file
@@ -0,0 +1 @@
|
||||
#pragma once
|
38
include/Uri.hpp
Normal file
38
include/Uri.hpp
Normal file
@@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace Socket
|
||||
{
|
||||
class Auth
|
||||
{
|
||||
public:
|
||||
Auth(std::string const& user, std::string const& host, uint16_t port);
|
||||
Auth();
|
||||
std::string const& GetUser() const { return user_;}
|
||||
std::string const& GetHost() const { return host_;}
|
||||
uint16_t GetPort() const { return port_;}
|
||||
private:
|
||||
std::string user_;
|
||||
std::string host_;
|
||||
uint16_t port_;
|
||||
};
|
||||
|
||||
class Uri
|
||||
{
|
||||
public:
|
||||
Uri(const char* value);
|
||||
Uri(std::string const& value);
|
||||
Uri();
|
||||
|
||||
std::string const& GetScheme() const { return scheme_;}
|
||||
Auth const& GetAuthority() const { return authority_;}
|
||||
std::string const& GetPath() const { return path_;}
|
||||
std::string const& GetHost() const { return authority_.GetHost();}
|
||||
uint16_t GetPort() const { return authority_.GetPort();}
|
||||
|
||||
void SchemeIs(std::string const& scheme);
|
||||
void AuthorityIs(std::string const& authority);
|
||||
|
||||
};
|
||||
}
|
0
tests/TcpTests.cpp
Normal file
0
tests/TcpTests.cpp
Normal file
Reference in New Issue
Block a user