Questions tagged [cpp-netlib]

C++ networking library; aims to become part of boost; built on top of Boost asio; has HTTP client and server; and general message template.

Cpp-netlib (http://cpp-netlib.org/) is a networking library.

It calls itself "a collection of Open-Source libraries for high level network programming"; its abstraction level is at the bottom of the OSI application layer. The library provides a general message template, http request and response messages built using the general message template, and HTTP client and (in proces) server code.

Cpp-netlib aims to become part of Boost. It relies havily on meta programming (i.e. templates). Cpp-netlib is built in top of Boost::ASIO (the asynchronous I/O library within Boost).

86 questions
0
votes
1 answer

The sample code I got from cpp-netlib won't compile

// Copyright 2009 (c) Tarro, Inc. // Copyright 2009 (c) Dean Michael Berris // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at //…
0
votes
1 answer

How to read UTF-8 enconding with cpp-netlib when not specified in html head

I'm trying to get the content of some websites using cpp-netlib (plus boost, on linux). Both netlib and boost are latest versions (installed this week, no compilation problems). The point is: from some sites, I get the correct UTF-8 encoding…
0
votes
0 answers

long compilation time of the simplest example of cpp-netlib

I'm using visual studio 2015 c++ compiler, boost 1.59 and cpp-netlib 0.11.2. I'm compiling with precompiled header. The compilation time of the simplest example of cpp-netlib takes more than 2.5 min. Is this normal? Can i speed it up?
ly000
  • 343
  • 4
  • 12
0
votes
1 answer

Compile cpp-netlib + Boost program with CMake not working

I'm trying to compile the hello world program from cpp-netlib site. The code is bellow. #include #include int main(int argc, char *argv[]) { using namespace boost::network; if (argc != 2)…
thiagoh
  • 7,098
  • 8
  • 51
  • 77
0
votes
1 answer

cpp-netlib complains about missing lboost-thread

I'm learning cpp-netlib and I tried running the exmaple client given on the official website. The code is very simple: #include #include int main(int argc, char *argv[]) { using namespace…
Calvin Hu
  • 3,595
  • 4
  • 18
  • 23
0
votes
1 answer

Integrating cpp-netlib to pre-existing boost package

I am trying to integrate cpp-netlib to my pre-existing boost package and use it in my program. I am simply including: #include and trying to use it like this: boost::network::uri::uri u("http://google.com"); While trying to…
PRIME
  • 1,058
  • 7
  • 21
0
votes
1 answer

How to construct a basic_request object (cpp-netlib)

I'm successfully using cpp-netlib (v0.11.0) and I'm developing some unit tests to test my HTTP server and handler function. The handler function has the following required signature: typedef boost::network::http::server
ksl
  • 4,519
  • 11
  • 65
  • 106
0
votes
1 answer

Is it possible to alter the HTTP client timeout period (cpp-netlib)?

I'm using cpp-netlib (v0.11.0) to send HTTP requests. I'd like to know if it's possible to alter the timeout period when sending an HTTP POST request. I'm running some unit tests, one of which sends an HTTP request to an address where there is no…
ksl
  • 4,519
  • 11
  • 65
  • 106
0
votes
1 answer

Instantiating template with functor type for callback

I have a question about a 'technique' that is used in cpp-netlib to implement an HTTP server and handler requests. The documentation states: As with the HTTP client, the HTTP server that is provided with cpp-netlib is extensible through the tag…
ksl
  • 4,519
  • 11
  • 65
  • 106
0
votes
1 answer

Sending HTTP POST requests using cpp-netlib

UPDATED I'm using cpp-netlib (v0.11.0) to send HTTP requests. The following code sends an HTTP POST request with the given body. client httpClient; try { uri::uri url; url << uri::scheme("http") << uri::host(m_hostname) <<…
ksl
  • 4,519
  • 11
  • 65
  • 106
0
votes
1 answer

Can't compile cpp-netlib example

I managed to install and run boost, I partialy also got to compile cpp-netlib's example code, but I got stuck on this compile error: obj\Debug\main.o||In function…
jave.web
  • 13,880
  • 12
  • 91
  • 125
0
votes
1 answer

cpp-netlib install visual studio 2013

The reason that i open this topic is because the information about setting up the cpp-netlib is quite tricky.The documentation that i used to follow the steps is bit confused, i have to mention that i'm a beginner with this open source libraries,…
0
votes
1 answer

cpp-netlib fetch Yahoo-Finance content failed after redirect

i tried to retrieve data from the yahoo finance website. But with the cpp-netlib it wont work, with a normal Browser there is no problem. using namespace boost::network; http::client::options options; options.follow_redirects(true); …
Roby
  • 2,011
  • 4
  • 28
  • 55
0
votes
1 answer

Add a header to a cppnet-lib response object

I would like to add a header to a cppnet-lib basic_response object. However, I am getting compilation errors. I can add a header to a basic_request as follows which compiles…
JonE
  • 1
  • 1
0
votes
1 answer

can't compile c++ netlib 0.11.0 in vs2013

I'm trying to get c++ netlib 0.11.0 working with Visual Studio 2013, and I'm having quite a difficult time. I placed the netlib main folder in my visual studio folder, and I set the include directory properly. You can see this clearly in the…
xcdemon05
  • 678
  • 3
  • 7
  • 20