Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1e14f3c

Browse files
committed
Refactored HTTP client request and response.
1 parent99c777c commit1e14f3c

File tree

8 files changed

+34
-39
lines changed

8 files changed

+34
-39
lines changed

‎boost/network/protocol/http/client.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include<boost/config.hpp>
1010
#include<boost/network/protocol/http/message.hpp>
1111
#include<boost/network/protocol/http/request.hpp>
12-
#include<boost/network/protocol/http/response.hpp>
12+
#include<boost/network/protocol/http/client/response.hpp>
1313
#include<boost/network/traits/ostringstream.hpp>
1414

1515
#include<boost/algorithm/string/classification.hpp>

‎boost/network/protocol/http/client/facade.hpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,13 @@
1010
#include<memory>
1111
#include<functional>
1212
#include<boost/network/protocol/http/client/pimpl.hpp>
13-
#include<boost/network/protocol/http/request.hpp>
14-
#include<boost/network/protocol/http/response.hpp>
13+
#include<boost/network/protocol/http/client/request.hpp>
14+
#include<boost/network/protocol/http/client/response.hpp>
1515

1616
namespaceboost {
1717
namespacenetwork {
1818
namespacehttp {
1919

20-
template<classTag>
21-
structbasic_request;
22-
23-
template<classTag>
24-
structbasic_response;
25-
2620
template<classTag,unsigned version_major,unsigned version_minor>
2721
classbasic_client_facade {
2822
typedef basic_client_impl<Tag, version_major, version_minor> pimpl_type;

‎boost/network/protocol/http/client/client_request.hpprenamed to ‎boost/network/protocol/http/client/request.hpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,17 @@
33
// (See accompanying file LICENSE_1_0.txt or copy at
44
// http://www.boost.org/LICENSE_1_0.txt)
55

6+
#if !defined(BOOST_NETWORK_PROTOCOL_HTTP_CLIENT_REQUEST_INC)
7+
#defineBOOST_NETWORK_PROTOCOL_HTTP_CLIENT_REQUEST_INC
8+
69
#include<boost/network/protocol/http/impl/request.hpp>
710

811
namespaceboost {
912
namespacenetwork {
1013
namespacehttp {
1114
using client_request = basic_request<tags::http_async_8bit_tcp_resolve>;
12-
}// namespace http
13-
}// namespace network
14-
}// namespace boost
15+
}// namespace http
16+
}// namespace network
17+
}// namespace boost
18+
19+
#endif// BOOST_NETWORK_PROTOCOL_HTTP_CLIENT_REQUEST_INC
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright 2016 Glyn Matthews.
2+
// Distributed under the Boost Software License, Version 1.0.
3+
// (See accompanying file LICENSE_1_0.txt or copy at
4+
// http://www.boost.org/LICENSE_1_0.txt)
5+
6+
#if !defined(BOOST_NETWORK_PROTOCOL_HTTP_CLIENT_RESPONSE_INC)
7+
#defineBOOST_NETWORK_PROTOCOL_HTTP_CLIENT_RESPONSE_INC
8+
9+
#include<boost/network/protocol/http/response.hpp>
10+
11+
namespaceboost {
12+
namespacenetwork {
13+
namespacehttp {
14+
using client_response = basic_response<tags::http_async_8bit_tcp_resolve>;
15+
}// namespace http
16+
}// namespace network
17+
}// namespace boost
18+
19+
#endif// BOOST_NETWORK_PROTOCOL_HTTP_CLIENT_RESPONSE_INC

‎libs/network/test/http/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ if (Boost_FOUND)
3535
${CPP-NETLIB_BINARY_DIR}/tests/cpp-netlib-http-${test})
3636
endforeach (test)
3737
set(TESTS
38-
http_client_request_test
3938
client_constructor_test
4039
client_get_test
4140
client_get_different_port_test

‎libs/network/test/http/client/request_test.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,10 @@
33
// (See accompanying file LICENSE_1_0.txt or copy at
44
// http://www.boost.org/LICENSE_1_0.txt)
55

6-
76
#include<gtest/gtest.h>
8-
// #include <boost/network/protocol/http/client/request.hpp>
9-
#include<boost/network/protocol/http/client.hpp>
10-
11-
12-
using client_request = boost::network::http::client::request;
7+
#include<boost/network/protocol/http/client/request.hpp>
138

9+
using client_request = boost::network::http::client_request;
1410

1511
TEST(http_client_request, construct_from_uri) {
1612
ASSERT_NO_THROW(client_request("http://cpp-netlib.org/"));

‎libs/network/test/http/client/response_test.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,10 @@
33
// (See accompanying file LICENSE_1_0.txt or copy at
44
// http://www.boost.org/LICENSE_1_0.txt)
55

6-
76
#include<gtest/gtest.h>
8-
// #include <boost/network/protocol/http/client/response.hpp>
9-
#include<boost/network/protocol/http/client.hpp>
10-
11-
12-
using client_response = boost::network::http::client::response;
7+
#include<boost/network/protocol/http/client/response.hpp>
138

9+
using client_response = boost::network::http::client_response;
1410

1511
TEST(http_client_response, construct) {
1612
ASSERT_NO_THROW(client_response());

‎libs/network/test/http/http_client_request_test.cpp

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp