Questions tagged [boost-beast]

Beast is a C++ header-only library serving as a foundation for writing interoperable networking libraries by providing low-level HTTP/1, WebSocket, and networking protocol vocabulary types and algorithms using the consistent asynchronous model of Boost.Asio.

275 questions
0
votes
1 answer

boost beast partial files server delivery

I was wondering if this code from https://www.boost.org/doc/libs/1_70_0/libs/beast/example/http/server/async/http_server_async.cpp // Attempt to open the file beast::error_code ec; http::file_body::value_type body; …
user5685755
0
votes
0 answers

Graph API: JSON batching to upload item to OneDrive is failing

I am trying to upload a text file to OneDrive using Graph APIs and I also want to update it in the same request using JSON batch. My JSON request body is below: { "requests":[ { "id":"1", "method":"PUT", …
user13260866
  • 131
  • 1
  • 2
  • 9
0
votes
1 answer

Error: resolve: Host not found (authoritative) boost beast

I'm learning to use the boost beast library. I already wrote the server. It works perfectly.I also have a client sending POST requests. I'm starting the server.However, I can't send him a request to the URL http://localhost:8080, but in response,…
0
votes
1 answer

How to bind parameter with Boost asio io_context post?

I am trying to post data to io_context, if I bind post with newdata method (with no parameter) it get called, however if I pass any parameter it failed to call newdata method. std::shared_ptr< boost::asio::io_context >ioc =…
rahul
  • 59
  • 1
  • 8
0
votes
1 answer

Concurrent request processing with Boost Beast

I'm referring to this sample program from the Beast repository: https://www.boost.org/doc/libs/1_67_0/libs/beast/example/http/server/fast/http_server_fast.cpp I've made some changes to the code to check the ability to process multiple requests…
0
votes
1 answer

C++ proxy developed on top of the beast boost, cannot receive big responses from the host and forward them to the original (downstream) client

I have implemented a proxy with the boost beast library, where I have used the async https server and client examples from boost organization. In my proxy I was using the http::request and http::response types…
marpas
  • 11
  • 1
0
votes
1 answer

convert boost beast http request to a string and write to ostringstream

I am trying to make a http call using boost beast and want to write it before writing to socket; i tried to use ostringstream to get the value of request to get it in printed log and getting the below error message: string verb = "POST"; using…
0
votes
2 answers

How to submit login request through boost beast?

I'm trying to login the site using boost beast, but in the result get only page with changed fields #include #include "boost/asio.hpp" #include "boost/beast.hpp" namespace beast = boost::beast; namespace http = beast::http; namespace…
0
votes
0 answers

Getting the specific data from a web page with boost/asio

I am learning boost/asio. I can do an endpoint, active and passive sockets. Now I want to write something like a simple client application, which will get specific data from web pages. So I have few questions about that: If I have a done an socket,…
user13207962
0
votes
1 answer

Measuring client back-up when using Boost.Beast WebSocket

I am reading from a Boost.Beast WebSocket. When my application gets backed up, the websocket sender appears happy to delay/buffer the data on their end (presumably at the application level, as they will delay by 1 minute or more). What is the best…
jhourback
  • 4,381
  • 4
  • 26
  • 31
0
votes
1 answer

boost beast Websocket Multi Request Server/Client is not really multi

I am writing a c++ project to forward clients websocket requests to server and return their message to each other as soon as each one, this code handles multi clients, but for connecting each client to server async_read stays on the first endpoint,…
Hani
  • 46
  • 1
0
votes
0 answers

Force 100% of CPU usage when using boost::beast::websocket synchronously

I'm trying to spin a dedicated thread pinned to a CPU-core to read some data from a web-socket. All the resources on that core are mainly dedicated to read data from the socket and parse it. I do not want a high-throughput, I want a minimum…
mohabouje
  • 3,867
  • 2
  • 14
  • 28
0
votes
1 answer

Boost.Beast: Is it possible to construct an HTTP batch request?

I've been using Boost.Beast for awhile now to send HTTP requests and I think it's great and works perfectly. But does anyone know if it's possible to construct an HTTP batch request using Beast? I'm thinking something like creating several…
filbri
  • 1
  • 1
0
votes
1 answer

Boost C++ - assertion failed: body_.file_.is_open() and body limit exceeded

I'm new to Boost and trying to add a POST request to one of the client example. But I failed to read a http::quest request on the server side. Assertion failed: body_.file_.is_open(), file D:\Boost C++…
SpellTheif
  • 715
  • 2
  • 12
  • 26
0
votes
1 answer

RESTServer loop forever to accept new connections outside the class

I have the following RESTServer implemented using boost::beast. The way the server is started is using void http_server(tcp::acceptor& acceptor, tcp::socket& socket). Logically acceptor and socket should logically belong to http_connection…
liv2hak
  • 14,472
  • 53
  • 157
  • 270