Skip to content

Commit 45b4c2b

Browse files
committed
Merge from TFS
1 parent fa40cc3 commit 45b4c2b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+764
-684
lines changed

Build/version.props

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,7 @@
88
<CppRestSDKVersionFileSuffix>$(CppRestSDKVersionMajor)_$(CppRestSDKVersionMinor)</CppRestSDKVersionFileSuffix>
99
<CppRestSDKVersionString>$(CppRestSDKVersionMajor).$(CppRestSDKVersionMinor)</CppRestSDKVersionString>
1010
</PropertyGroup>
11+
<!--
12+
Note: remember to regenerate guiddefs.wxi files using gen_guids_for_msi.ps1 whenever major or minor version file changes
13+
-->
1114
</Project>

Release/include/cpprest/asyncrt_utils.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,13 @@ namespace details
220220
#endif
221221
}
222222

223+
// Turn const_iterator into an iterator
224+
template <typename Container, typename ConstIterator>
225+
typename Container::iterator remove_iterator_constness(Container& c, ConstIterator it)
226+
{
227+
return c.erase(it, it);
228+
}
229+
223230
#ifdef _MS_WINDOWS
224231

225232
/// <summary>

Release/include/cpprest/http_client.h

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,22 @@ namespace pplx = Concurrency;
5555

5656
#include "cpprest/json.h"
5757
#include "cpprest/uri.h"
58+
#include "cpprest/web_utilities.h"
5859
#include "cpprest/basic_types.h"
5960
#include "cpprest/asyncrt_utils.h"
6061

6162
namespace web
62-
{
63+
{
6364
namespace http
6465
{
6566
namespace client
6667
{
6768

69+
// credentials class has been moved from web::http::client namespace to web namespace.
70+
// The below using declarations ensure we dont break existing code.
71+
// Please use the web::credentials class going forward.
72+
using web::credentials;
73+
6874
#ifdef _MS_WINDOWS
6975
namespace details {
7076
#ifdef __cplusplus_winrt
@@ -75,33 +81,6 @@ namespace details {
7581
}
7682
#endif // _MS_WINDOWS
7783

78-
/// <summary>
79-
/// credentials represents a set of user credentials (username and password) to be used
80-
/// for the client and proxy authentication
81-
/// </summary>
82-
class credentials
83-
{
84-
public:
85-
credentials(utility::string_t username, utility::string_t password) :
86-
m_is_set(true),
87-
m_username(std::move(username)),
88-
m_password(std::move(password))
89-
{}
90-
91-
const utility::string_t& username() const { return m_username; }
92-
const utility::string_t& password() const { return m_password; }
93-
bool is_set() const { return m_is_set; }
94-
95-
private:
96-
friend class web_proxy;
97-
friend class http_client_config;
98-
credentials() : m_is_set(false) {}
99-
100-
utility::string_t m_username;
101-
utility::string_t m_password;
102-
bool m_is_set;
103-
};
104-
10584
/// <summary>
10685
/// web_proxy represents the concept of the web proxy, which can be auto-discovered,
10786
/// disabled, or specified explicitly by the user

Release/include/cpprest/http_client_impl.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
*
2525
* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
2626
****/
27+
2728
#include "cpprest/http_helpers.h"
2829
#ifdef _MS_WINDOWS
2930
#if !defined(__cplusplus_winrt)
@@ -463,12 +464,6 @@ void http_client::build_pipeline(uri base_uri, http_client_config client_config)
463464
m_pipeline = ::web::http::http_pipeline::create_pipeline(std::make_shared<details::http_network_handler>(std::move(base_uri), std::move(client_config)));
464465
}
465466

466-
pplx::task<http_response> http_client::request(http_request request, pplx::cancellation_token token)
467-
{
468-
request._set_cancellation_token(token);
469-
return m_pipeline->propagate(request);
470-
}
471-
472467
const http_client_config& http_client::client_config() const
473468
{
474469
auto* ph = static_cast<details::http_network_handler*>(m_pipeline->last_stage().get());

0 commit comments

Comments
 (0)