Questions tagged [libcurl]
Use this tag only for questions related to the multiprotocol internet transfer library, for question related to command line tool please use the specific curl tag
3,131
questions
0
votes
0
answers
46
views
Build curl source code with Visual Studio Developer command line (NMAKE)
I want to use libcurl in my C program. So I have curl-7.87.0 but some errors happen in x64 build.
in x86 build does not have any errors but its have libcurl.lib not libcurl.a in libs.
To build in ...
-1
votes
1
answer
16
views
Adding libcurl to Visual Studio 2010, curl/curl.h
I'm trying to add libcurl to a C project in Visual Studio 2010. I was able to find a .lib file, but I still get the following error message:
Cannot open include file: 'curl/curl.h'
I've tried adding ...
-1
votes
0
answers
22
views
how to download gitlad addtion upload file by gitlab api?
I release my code and use tags,then I upload binary file to gitlab.
I can get file path by web browser,but how can I download my binary file use gitlab api,not download my source code ?
enter image ...
-1
votes
0
answers
31
views
Is there a way to get the port number of which pycurl is using?
I am using pycurl to test a server. Among 13k tests there is about 5 random requests timed out.
To filter the packet captured, I need to know when a connection timed out, which port number it was ...
-1
votes
0
answers
30
views
Problem with resolving L0039: reference to undefined symbol curl_easy_*
I've been trying to make a package for PlayStation4 using UnrealEngine version 4.27 with Sony SDK 9.0
The project is compiling and I am receiving linker errors for CURL easy functions, like:
...
0
votes
0
answers
32
views
Is there a concurrent request limit with libcurl's C++ implementation in certain environments?
I'm running a C++ script with multiple threads, each with their own curl handles initialized with curl_easy_init. I've noticed that things run fine with up to around 40 threads, but when I reach 50 ...
0
votes
1
answer
66
views
curl/curl.h: No such file or directory (Visual Studio 2022 on Windows)
I installed curl with nuget package.
Command that i used to run the command :
gcc file.c -L C:/Users/Silme94/Downloads/curl-7.87.0_2-win64-mingw/lib/libcurl.a -lcurl -o file
My code :
#include <...
0
votes
1
answer
65
views
write access violation with c++ libcurl [closed]
I'm trying to create c++ code that download data from some URLs, but it's throwing a write access violation:
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#ifndef WIN32
...
0
votes
0
answers
62
views
How to upload file using file_get_contents() to Telegram API in PHP?
I need to upload file with POST method from my server to telegram bot api using file_get_contents()
Documentation to upload file to Telegram:
https://core.telegram.org/bots/api#senddocument
For some ...
0
votes
0
answers
39
views
http challenge response POST with curl
I have written a small c++ program to connect to my router (avm Fritzbox 7590) using a challenge response method.
For this I use openssl (SHA256), curl(GET & POST) and tinyXML (parsing the ...
-1
votes
0
answers
33
views
PHP processes crashing with a segmentation fault
I have a PHP process running using multiple technologies pdo, mongodb, multicurl, redis and the code was working fine 2 days ago and now it just started giving the Segmentation fault error & the ...
-1
votes
1
answer
35
views
Getting libcurl to produce CRLF in email using const char array
Using C++, Windows 10, VS 2019, Curl libcurl
I am trying to fill a const char array in order to send an email using libcurl.
The libcurl example defines the char array this way outside of the main()
...
0
votes
0
answers
44
views
CURLOPT_REQUEST_TARGET with pycurl
I would like to use pycurl with the option that matches --request-target on the command line tool.
When trying this with the following code:
import pycurl
c = pycurl.Curl()
c.setopt(c.URL, "http:/...
0
votes
0
answers
46
views
Installing libcurl for Visual Studio 2019 for x64 package
I've attempted the following to get the lib curl installed for Visual Studio 2019 but it is not working. The libcurl.lib file is 20 KB which is incorrect.
vcpkg install curl:x64-windows
I also do not ...
0
votes
0
answers
21
views
What's the behavior of std::future when libcpr::PostCallback got Timeout/ConnectionTimeout?
For certain reasons I'm trying to use libcpr::PostCallback to send requests, and a customized callback function to parse responses for later use.
Since libcpr::PostCallback use std::future as its ...
0
votes
1
answer
85
views
how to resolve SSL Connect Error in curl cpp
I have been working on an application which uses curl for communication to a server. Sometimes I get an "SSL Connect" error.
curl/libcurl version
7.86
operating system
Windows
I tried to ...
-1
votes
1
answer
91
views
How to include curl header or library in C compiler(mingw)(on WINDOWS)?
I want to include curl.h to use the functions included there for my C program and I downloaded them. By them I mean to say .h,.c,.a files i.e. a whole library(curl library). Following is the location ...
0
votes
0
answers
60
views
LIBCURL C SFTP Authentication with both public key and password
I am developing an C/C++ application that performs file transfers using SFTP protocol with lib-curl. However, I am facing an specific problem that an remote host is requires both public-key and user ...
0
votes
1
answer
41
views
C++ cURL JSON save token to file or cookie
I want to save token from oAUTH2 login to file or cookie, but when I try to save it to file I get msg from cURL : response when I try to save data to memory but when I comment this line:
...
0
votes
0
answers
24
views
Can't get full CA chain using libcurl
I want to get api.dropboxapi.com's Root CA to pass SSL check
But i can only get 2 certs using libcurl, which the domain has 3 certs.
Here is my Code, use libcurl CURLOPT_CERTINFO, Test on WSL2 Debian
#...
0
votes
0
answers
30
views
cURL / OpenSSL – access Tls Client Hello header, on client side, via callback
I'm using libcurl, with OpenSSL for HTTPS communication.
Is it possible to register a callback to either cURL or OpenSSL, through which it would be possible to read the buffer of the TLS Client Hello ...
-1
votes
1
answer
40
views
receiving HTTP requests in c++ using libcurl
I have python client that sends HTTP requests using requests.post
and a c++ server that should receive it. I used
char* data = new char[len + 1];
int res = recv(client, data, len, 0);
if (...
0
votes
1
answer
41
views
libcurl post request multiple lines
I am currently working on an application that needs to communicate between two web servers. In order to do that I am using libcurl in c. I am perfectly ok with making GET requests, but the POST ones I'...
0
votes
0
answers
31
views
Send request from domain IP when server has different IP [duplicate]
I have a shared hosting with a dedicated ip, when I send a request with curl (php), the receiver sees the server IP, instead of the ip the domain resolves to (the dedicated one).
$ch = curl_init("...
0
votes
0
answers
169
views
Parsing longer libcurl responses with cJSON_Parse() sometimes produces broken object
So I'm making a C program using cJSON and curl.
In the curl process itself, I need to send a GET request to an API, and the request link itself would be this.
https://projectkiri.id/api?version=2&...
-1
votes
1
answer
66
views
Handling curly braces in curl/libcurl
From the command line, I have a curl request with two query parameters that use curly braces. However, one only works when URL-encoded and the other only works when it is not URL-encoded.
Here's an ...
0
votes
0
answers
24
views
Libcurl openSSL certificate problem (c++)
I am writing a program in C++ and now there is a need for cross-platform and dependency adjustment. While I was writing for linux, everything was OK, but I started to port the code to Windows. My ...
0
votes
0
answers
39
views
how to make curl works with https in android devices
curl version is 7.78.0
openssl version is 1.1.1k
I ran a sample code to test.
The certificates path on Android is /system/etc/security/cacerts
curl_easy_setopt(curl_.get(), CURLOPT_SSL_VERIFYPEER, 1L);...
0
votes
2
answers
56
views
Linker cant find FLTK functions definitions
Im new to C++ and making project using FLTK and cURL. Currently Im trying to compile my app for Windows using MinGW g++.
Ive put files from FLTK and cURL include and lib folders into my own include ...
0
votes
0
answers
81
views
curl downloads empty file every time
I'm trying to download a file through curl C++ using this code:
#define CURL_STATICLIB
#include <iostream>
#include <string>
#include <curl/curl.h>
int main() {
CURL *curl;
...
0
votes
1
answer
65
views
Why doesn't my windows environment properly install external C++ libraries?
Description
Hi everyone, I'm new to C++ have having difficulty working with external libraries:
I'm currently running on Windows 10 and trying to install a library like libcurl on my machine. I have ...
0
votes
0
answers
24
views
LibCurl Telnet write data "An unknown option was passed in"
I have projector with option to communicate by TELNET. I want to send to him question about power on/off by this comamnd:
:POWR ?\r
My code:
FILE* console = fopen("/dev/tty", "w"...
0
votes
0
answers
23
views
CURL only retrives 1420 bytes of a web page
I have a small C function calling the curl library to provide HTTPS support
The functions takes a HTTPS URL and requests the page.
Generally it works well, but it will not return more than 1420 byes ...
0
votes
0
answers
220
views
download.file - curl: (60) SSL peer certificate or SSH remote key was not OK
I know variations of this question have been posted elsewhere in different forums, but I swear I've navigated all those questions and read all possible documentation to no avail.
I have a PC with ...
0
votes
0
answers
11
views
Leak memory still reachable in libcurl [duplicate]
`
#include <curl/curl.h>
int main(int argc, char *argv[]){
curl_global_init(CURL_GLOBAL_DEFAULT);
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "...
0
votes
1
answer
31
views
How to confirm a library is linked statically?
I've edited my CMake script to link libcurl with my C++ application on Linux.
Besides adding libcurl to my target link libraries, I've set the libcurl flag DCURL_STATICLIB.
What is the definitive way ...
0
votes
0
answers
41
views
Why must both .a and .dylib files be present when (statically) linking libcurl?
I built libcurl for macos following the "Apple Platforms" section of https://curl.se/docs/install.html. I link it into my application by adding the resulting libcurl.a file (in the artifacts/...
0
votes
0
answers
71
views
Slow Performance with libcurl when changing Ip Address
First time developing with libcurl and got some unexpected results:
I'm trying to reuse the same CURL handle in order to reuse it's connections associated with it. However, I noticed a huge ...
0
votes
1
answer
139
views
How to cross-compile with curl on Ubuntu for Windows
I want to compile this source code:
#include <curl/curl.h>
#include <iostream>
int main() {
std::cout << "I am compiled with curl";
}
I am compiling on Ubuntu 22.04, ...
0
votes
0
answers
40
views
How do I POST string as a text file with libcurl?
I want to post data with libcurl to a discord webhook as a file, but since discord webhook have a limit (2000 characters), And my message are long, I want to post it as a text file.
I have this code ...
0
votes
0
answers
30
views
Why did GitHub CI just start failing to locate libcurl?
CI was working just fine but now it's failing. I don't believe anyone has made any changes to test environment or the set .yml. It just looks like libcurl4-openssl-dev is no longer available?!?
The ...
0
votes
1
answer
53
views
C libcurl verify if message is sent to webhook
Because of variable my_description changes frequently I get this error:
{"code": 50109, "message": "The request body contains invalid JSON."}
It is possible to modify ...
0
votes
1
answer
49
views
What may cause a CURLE_UNKNOWN_OPTION in result of curl_easy_getinfo for CURLINFO_RESPONSE_CODE
I'm trying to get a response code for HTTP request inside WriteCallback. I'm sure it worked in my main app just a few days ago, but doesn't work now. However, I tried to checkout previous branch and ...
0
votes
0
answers
26
views
Why does my SSL verification libCUrl code work on my local machine but not on the server?
I have the following code snippet which is sample code generated by postman for the most part.
main.cpp:
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>
int main(int ...
0
votes
2
answers
51
views
Can anyone suggest why R CMD INSTALL is not able to find libcurl when I attempt to install R curl pkg from source?
Dear Stackflow Community,
I'm trying to install the R "curl" package from source using a specialized R CMD INSTALL script on Debian 11 x86_64 machine. The source package downloads and build ...
0
votes
1
answer
30
views
wierd html returned by libcurl GET
I am working on a program that does multiple get requests from kijiji (need to get the html of 50 or so ads at a time for statistics purposes). I would have made a short compilable program but its not ...
0
votes
0
answers
39
views
Is there an easier method to find filename when downloading file with curl
I need to implement the following strategy for naming a file that I want to download by HTTP using some URL:
If a response has a filename= field - use it. This field, for example, may be inside the ...
-1
votes
1
answer
45
views
Running libcurl http request from DllMain() in a DLL file on a separate thread
#pragma once
#include <curl/curl.h>
#include <spdlog/spdlog.h>
#include <string>
#include "json.hpp"
inline std::string GetData() {
CURL* curl = curl_easy_init();
...
-1
votes
2
answers
49
views
how to insert vector element into link with cURL c_str() function in C++?
I'm working on a c++ code that fetches a variable from a text file and adds it to a fixed url, similarly to the following example:
int x = numbers[n];
string url = "http://example.com/" + x;
...
0
votes
0
answers
361
views
Libcurl failed to receive handshake, SSL/TLS connection failed
I had an issue for the last few days and the hosting technical team wasn't able to help me out, which is why I am asking here. Any information would be highly appreciated.
Useful Information
Software ...