86 questions
0
votes
1
answer
200
views
C++ (cpp-netlib) http listener - how to remove headers
I created an HTTP listener that accepts POST requests for files. I followed this template almost exactly:
https://github.com/cpp-netlib/cpp-netlib/blob/main/libs/network/example/http/echo_async_server....
0
votes
0
answers
232
views
Can't Compile Code Using cpp-netlib Library
I have been trying to get this small program to work but keep getting compiler errors. I am using VS 2019 on windows and following this document. The program just gets the header of www.example.com ...
4
votes
1
answer
4k
views
Is there a way to avoid error C2039: "value": Is not a member of "boost::proto"?
I'm using boost::network::uri::encoded() to encode my request URL.
But when I'm building the project, I see the error:
error C2039: "value": Is not a member of "boost::proto"
...
1
vote
0
answers
360
views
HTTPS client with cpp-netlib - sslv3 alert handshake failure
I am trying to set up a simple HTTPS client in C++ to test some features against the Reqres API.
I am using cpp-netlib as the main C++ network library. Based on the examples provided in the ...
0
votes
1
answer
561
views
CMake failing to build, can't find openssl
I'm trying to build cpp-netlib 0.12.0 stable in Ubuntu 18.04, but when I get to running
$ make -j4
I get a lot of errors, such as:
error: ‘SSL_R_SHORT_READ’ was not declared in this scope
...
1
vote
2
answers
4k
views
How to build static library .a for ARM using cross compiler?
I was trying to compile statically cpp-netlib and rpclib for ARM device.(Same as ZEDboard)
Everything i did is changed the compiler and system settings in CMakeLists.txt file.
set(...
2
votes
3
answers
853
views
POST request body is empty (cpp-netlib 0.13.0)
I have upgraded cpp-netlib from v0.11.0 to 0.13.0 and run into some difficulties.
Previously, when a request was sent to the server, the body of the request could be read from the request object.
...
1
vote
0
answers
331
views
How to properly wait for the async http request with no "Connection: close" header to complete in the cpp-netlib?
I'm opening a long lived connection with a remote server. Server send me updates in this connection for a long time. So, I do not use the Connection: close header as suggested in cpp-netlib docs in my ...
0
votes
0
answers
75
views
How to link multiple similar libraries at once in cmake
I am quite new to cmake and have a question what is the best way to achieve this:
I need to link my code against three libraries from cpp-netlib:
cppnetlib-uri
cppnetlib-server-parsers
cppnetlib-...
0
votes
1
answer
587
views
cpp-netlib hello world example wont compile on linux
I tried to run the hello world example on cpp-netlib.org using cpp-netlib-0.12.0 and boost-1.64.0 on Ubuntu 16.04. A piece of the code is (from line 1):
#include <boost/network/protocol/http/...
3
votes
1
answer
1k
views
https client get with cpp-netlib using a client certificate and password
I am trying to use cppnetlib, or even the boost asio libraries to connect to do a simple url get and pull the resulting page down.
I have gotten it to work with http, and even https usign cppnetlib ...
2
votes
1
answer
670
views
'boost::detail::variant::visitation_impl': none of the 2 overloads could convert all the argument types
I'm not able to build two of my projects with Boost libraries 1.61.0 and Visual Studio 2015 Update 3.
These projects used to build fine for years with various combinations of Visual Studio and Boost ...
3
votes
1
answer
824
views
Async client response with cpp-netlib?
I am considering using cpp netlib for a new project. All of the examples show reading the body of the response in a blocking manner:
client::response response_ = client_.get(request_);
std::string ...
1
vote
2
answers
859
views
Cannot convert boost::asio::netdb::errors to std::error_code
I'm trying to compile this code (taken from the cpp-netlib documentation):
#include <boost/network/protocol/http/client.hpp>
#include <iostream>
int main(int argc, char *argv[]) {
...
0
votes
1
answer
824
views
Building cpp-netlib with CMake
I've downloaded the cpp-netlib source, extracted it to a folder and for some reason I'm completely lost. I read the documentation carefully, it states I have to download CMake as well, which I did. ...
-5
votes
1
answer
314
views
errors when i'm compiling my project [closed]
when i'm compiling my project i will get a lot of errors:
1>------ Build started: Project: cpp-uri, Configuration: Debug x64 ------
1> uri_builder.cpp
1>c:\gta-five\multiplayer\vendor\cpp-...
2
votes
1
answer
357
views
Error when compiling cpp-netlib source
I have installed the c++ networking library as described in the documentation and I am trying to compile the http client example manually. I am using the 0.11 version of the library.
I am using this ...
3
votes
1
answer
541
views
Segmentation fault on using boost syslog and cpp-netlib
After adding boost syslog into source code, segmentation fault appears inside cpp-netlib library.
I was able to prepare minimum working code snippet to reproduce the problem.
#include <boost/...
0
votes
1
answer
469
views
Boost Network Library not recognized on MAC OSX
So my current code I am trying to compile:
#include <boost/network/protocol/http/client.hpp>
int main()
{
boost::network::http::client client;
boost::network::http::client::request ...
2
votes
1
answer
1k
views
CMake can't find cpp-netlib libraries
I recently started learning CMake and have decided to use it with an old project I was working on. The project has cpp-netlib, boost and Openssl as dependencies.
Here is the working CMakeLists.txt ...
2
votes
0
answers
167
views
Headers when handling response to async request
I'm using cpp-netlib library to create HTTP GET requests, the documentation shows this function call:
response_ = client_.get(request_, callback)
where the signature of callback should be
void(...
2
votes
1
answer
390
views
Why does my simple cpp-netlib program take so long to compile?
I recently started learning cpp-netlib and am testing out one of netlibs example programs
#include <boost/network/protocol/http/client.hpp>
#include <iostream>
int main()
{
using ...
1
vote
1
answer
357
views
cpp-Netlib with Boost Mac OSX seg fault when using HTTP Client body
I recently started learning cpp-netlib which requires Boost and am running into some issues when trying to compile one of the cpp-netlib examples from there site http://cpp-netlib.org/0.11.2/examples/...
0
votes
1
answer
675
views
C++ program crashes before main when run from Xcode (but OK from the command line)
The following program crashes before main is called when run from Xcode 6.3.2 on OS X 10.10.5 (Yosemite) in both debug mode and release mode.
#include <boost/network/uri.hpp>
int main()
{
...
0
votes
1
answer
222
views
The sample code I got from cpp-netlib won't compile
// Copyright 2009 (c) Tarro, Inc.
// Copyright 2009 (c) Dean Michael Berris <[email protected]>
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file ...
0
votes
1
answer
242
views
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 ...
0
votes
0
answers
87
views
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. ...
-1
votes
1
answer
544
views
How to open file 'libboost_thread-vc110-mt-gd-1_58.lib' - cpp-netlib?
So I'm almost a complete newbie to c++. I've been trying desperately for the better part of the day to use cpp-netlib, but I can't really proceed, and would appreciate some help.
I have downloaded ...
0
votes
1
answer
2k
views
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 <boost/network/protocol/http/client.hpp>
#include <iostream>
int main(int argc, char *...
0
votes
1
answer
133
views
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 <boost/network/protocol/http/client.hpp>
#include <iostream>...
19
votes
1
answer
3k
views
Where is a delay in an HTTP POST coming from?
I am developing a web service on Ubuntu 14.04 in C++ using cpp-netlib in asynchronous mode. The service needs to respond to data sent over HTTP POST in the message body. I am observing poor ...
0
votes
1
answer
217
views
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 <boost/network/uri.hpp>
and trying to use it like this:
boost::...
0
votes
1
answer
57
views
How to construct a basic_request<Tag> 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::...
0
votes
1
answer
2k
views
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 ...
2
votes
0
answers
68
views
cpp netlib with old c++ compiler
I am using c++ 03 compiler with cpp-netlib and on installation it gives the following error from CMake.txt
No advanced standard C++ support (-std=c++11 not defined)
Isnt there any support of cpp-...
-1
votes
1
answer
426
views
C++ cpp-net lib not found
Here is a piece of code which is an example from cpp-netlib
#include <boost/network/protocol/http/server.hpp>
#include <string>
#include <iostream>
namespace http = boost::network:...
2
votes
1
answer
255
views
Running cpp-netlib in Xcode 6 - compiles but crashes on run
I have installed boost and cpp-netlib and successfully ran all tests. I can compile the following example from the command line with the following options:
clang++ -o test main.cpp \
-I/path.../cpp-...
1
vote
1
answer
1k
views
querying the request of cpp-netlib HTTP server
A question similar to (but more specific than) this unanswered question about headers in cpp-netlib HTTP server side.
This is with using cpp-netlib 0.11.1 on Linux/Debian/Sid/x86-64 with clang++ 3.5 ...
0
votes
1
answer
163
views
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 ...
0
votes
1
answer
5k
views
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::...
4
votes
1
answer
186
views
how to set a flag (cpp-netlib)
I think my question is really trivial, but I can't get it to work nonetheless
std::string url="www.google.it";
boost::network::http::client client1_(_follow_redirects=true, _cache_resolved=true);
...
2
votes
1
answer
1k
views
How to stream an image from Python to C++ using Apache Thrift
How could I stream files(images) using Apache Thrift?
I have searched a lot about Thrift and did not find any well written documentation regarding to it. Why did Facebook open sourced this project ...
4
votes
1
answer
860
views
cmake fails to find OpenSSL libs (cpp-netlib)
I'm trying to build the cpp-netlib on windows (8.1) with VS2013 (express).
When I run cmake:
C:\...\build\cmake ..\source -DCMAKE_BUILD_TYPE=Release
it writes:
Could NOT find OpenSSL, try to set ...
1
vote
0
answers
401
views
Building cpp-netlib from visual studio
I'm trying to build the cpp-netlib on windows using visual studio 2013 (express).
I tried to do so from two sources:
1. Downloaded the archive from the site, ran cmake, opened the solution file in ...
0
votes
1
answer
416
views
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 'ZN5boost7network3uri3uri5parseEv':
...
2
votes
1
answer
840
views
How to build CPP-NETLIB libraries on Windows using Code::Blocks or MinGW
Cpp-netlib's "getting started" talks about building libraries where the result should be:
cppnetlib-client-connections.lib
cppnetlib-server-parsers.lib
cppnetlib-uri.lib
It also provides CMakeLists....
0
votes
1
answer
2k
views
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'...
2
votes
1
answer
985
views
cpp-netlib request with uri::uri
I'm using the cpp-netlib version 0.11 with boost 1.55 and want to create a request object with these lines:
#include <iostream>
#include <boost/network/protocol/http/client.hpp>
#include ...
0
votes
1
answer
194
views
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 ...
0
votes
1
answer
374
views
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 ok:
boost::network::http:...