← All tasks
cpplibcpr/cpr #669Not a task: not reproduced

Question about Get requests

envgap__libcpr__cpr-669

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
51c196e013b5624232f3f8a53122a2bb27dfc023
Manifest
CMakeLists.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

libcpr/cpr #669 · read the original issue
I'm searching for a lib to create an http client in c++. This lib looks perfect, however, for some reason, I'm not getting a response when making a very simple get request using a fake JSON generator. This is just a question from my side, I don't believe it's a bug in the lib so I'm just asking here.



## Description



Here is my very simple example:



```

#include <cpr/cpr.h>

#include <iostream>



int main(int argc, char** argv) {

cpr::Response r = cpr::Get(cpr::Url{"https://jsonplaceholder.typicode.com/posts"});

std::cout << r.status_code << std::endl;  // should print something but it doesn't

std::cout << r.url << std::endl;  // should print something but it doesn't

std::cout << r.text << std::endl;  // should print something but it doesn't



}

```



## Expected Behavior

Well I expected to receive a response, meaning r.url, r.text should have a value



## Actual Behavior

I receive nothing back, meaning r.url and r.text are not printed/they have no value.



## Your Environment

* Version used:1.6.2

* Where did you get it from (e.g. conan, vcpkg, master, ...): used the FetchContent example in the readme

* Operating System and version: ubuntu 20.04

Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]