Questions tagged [curl]

11983 questions
1

votes
1

answer
180

Views

How do we implement a curl post in pharo

I have curl post to implement in pharo, but it seems like there is not much in term of explanation on how to do that. I saw few example but they ARE way simpler than what I need to. I would you do that inn pharos? $ curl 'https://url_server' \ -X POST \ -H 'key: MY PASSWORD' \ -H 'Content-Type: ap...
ludo
-1

votes
0

answer
11

Views

Fetch JSON data based on email using PHP

HI there What I want is to fetch the User Data based on the email ID From The JSON File. the Json Data is in this Format . [ { 'id': 1, 'name': 'Leanne Graham', 'username': 'Bret', 'email': '[email protected]', 'address': { 'street': 'Kulas Light', 'suite': 'Apt. 556', 'city': 'Gwenborough', 'zipco...
Abnit Chauhan
0

votes
1

answer
6

Views

'curl' is not recognized as an internal or external command, operable program or batch file

While executing curl command through os.system(cmd) in python script cmd='curl' os.system(cmd) 'curl' is not recognized as an internal or external command, operable program or batch file.
Rishabh Jaiswal
1

votes
2

answer
51

Views

How to output first line of curl result in a file with bash script

I want to read a file of urls, curl each url and only get the first line which contains the HTTP code. I am running under Windows 10 inside Cmder. #!/bin/bash input='urls.csv' truncate -s 0 dest.csv while IFS= read -r var do result= `curl -I ${var%$'\r'} | grep HTTP $result` echo '$var $result' >> d...
Yvon Huynh
1

votes
3

answer
50

Views

How do I flatten JSON data of the Pandascore E-Sports GET response format to have a very clean dataframe in pandas?

I am trying to get a nice pandas dataframe of a JSON file I got from the PandaScore REST API. I realize that in order to do this, I need to flatten the values which contain lists and dictionaries, but I am getting errors. For this reason, I was not sure exactly how to proceed. As far as the datafram...
pythonRCNewbie
0

votes
0

answer
3

Views

On whm server curl don't run somtimes

curl http://api.betsapi.com/ This is curl command. It is working on other server but on my whm it have error like that. curl: (6) Couldn't resolve host 'api.betsapi.com' Who can fix it?
tolren frank
1

votes
1

answer
6k

Views

http 1.0 keep-alive server and curl

I'm busy with my own http server implementation on an embedded platform. Technically the server is HTTP 1.0 compliant, and therefore it expects the the client to send the header 'Connection: Keep-Alive' to keep the connection open. The implementation looks like this. I removed the code that parses t...
user1964644
1

votes
1

answer
625

Views

phpUnit - Functions in test class that aren't tests

I'm doing some speed comparisons between reports in phpunit, as I am trying to figure out an optimization problem. I have a couple of functions that aren't necessarily tests, but don't belong in the functionality of the project either. I am using them in order to make my tests small and readable. Th...
Paul Stanley
1

votes
1

answer
325

Views

Call to undefined function cur_init()

I've seen plenty of these both here on stackoverflow and in other places - by try as I might i am still getting this error. Any way - useful information The Code I am trying to execute is as follows Windows 7 (64bit) IIS Express PHP.INI executing phpInfo() gives the following information. Php Versio...
Paul S Chapman
1

votes
0

answer
10

Views

API to list activity log in Urban Airship

I'm using PHP with CURL to send push notification by using API of Urban Airship to android and ios devices for more than hundred apps. Now I want to list activity logs like Airship panel but could not find any suitable API like we use for push '/api/push' and for list schedule 'api/schedules' so cou...
Hariom
2

votes
1

answer
50

Views

Trouble downloading a file in browser using CURL

I have a problem I am trying to solve. The issue is downloading a file using CURL and offering a Save As prompt to the user in browser when this happens. I can successfully open the file but it opens directly in the browser as character data. So far I have tried using the standard Content-Type and C...
P A
1

votes
1

answer
390

Views

How to get exact page content in wget if error code is 404

I have two url one is working url another one is page deleted url.working url is fine but for page deleted url instead of getting the exact page content wget receives 404 Working url import os def curl(url): data = os.popen('wget -qO- %s '% url).read() print (url) print (len(data)) #print (data) cur...
Mounarajan
1

votes
1

answer
56

Views

How do I behave responsibly when fetching a URL provided by user?

What problems am I likely to face / what should I consider? I'm starting from a point of rate-limiting per user, maybe overall, possibly per domain. I guess I'll parse_url(), make sure I set reasonable timeouts, etc. Is there a big class of security hole I need to watch out for?
Bobby Jack
1

votes
1

answer
198

Views

Using Environment Variables in a cURL request on Azure Devops

I'm trying to upload a zip file to Netlify with a command line task using cURL on Azure DevOps. Obviously I don't want to have my Netlify access token in the yaml file, so I've created a secret variable for it (using the UI designer) and mapped it using the syntax in the docs. However I keep gettin...
MrBliz
1

votes
2

answer
156

Views

How to use invoke http to perform GET request in nifi?

I need to perform a get request from nifi to couchbase. The curl command is: curl http://HOST:PORT/query/service -d 'statement=select item.Date from bucket unnest bucket as item' -u USER:PASSWORD I tried using InvokeHttp and ExecuteStreamCommand but it keeps returning errors(status code 400). The fu...
Gal Itzhak
0

votes
3

answer
36

Views

How to clean/format awk output?

Trying to grab just the latest version number which will always be behind 'misc' from ftp://ftp.adobe.com/pub/adobe/reader/mac/AcrobatDC/ I might be able to fix this by using 'cut' but it might not stick with the next latest version if the time is x:xx. Current code: latestver=`/usr/bin/curl -s -L...
DankDalf
1

votes
1

answer
116

Views

Downloading an image from twitter with libcurl C++

I'm making a program that takes a person's tweet, and if it contains an image, download it. Why can I download an image from this URL (Example #1) http://www.google.co.id/intl/en_com/images/logo_plain.png And not from this URL (Example #2) https://www.google.com/imgres?imgurl=https://pbs.twimg.com/m...
user9143463
1

votes
0

answer
669

Views

curl https://google.com/ not working

I am trying to fetch the details of google.com using curl. But I am getting the below error. I checked a lot of posts /blogs on internet but could not make it work. I want it to be secure, so I cant use '-k' option. Os Details [email protected]:/etc/ssl/certs# uname -a Linux ubuntu-amd64 3.13.0-135-...
Sujeet Padhi
1

votes
0

answer
92

Views

Simple GET request in cURL is unresponsive

I wrote python code for a very basic server to test cURL on my terminal (Mac OS X) from flask import Flask node = Flask(__name__) @node.route('/greet', methods=['GET']) def greet(): print 'hello, world' return 'hey!' node.run() However, when I ran the code on my terminal, using $ python testblock....
ztlm622
1

votes
2

answer
725

Views

Amazon API get all images from product

i have simple question because don´t find any answer for this. Actually i can use Amazon´s API for get informations about product from ASIN code, but in this image´s case, i can get one single image in different formats, big, middle thumb, etc, right ? In my case i want know if it´s possible get...
Jos
1

votes
2

answer
75

Views

Send JSON data via POST PHP instead of Ajax version

I have to create a JSON object that is the equivalent of a JSON object created with this Ajax code snippet: $.ajax({ type : 'POST', url : '?', dataType: 'json', data : 'username=' + encodeURIComponent($('input[name='username']').val()) + '&password=' + encodeURIComponent($('input[name='pas...
UrbiJr
1

votes
1

answer
1.2k

Views

PHP and CURL POST XML

I have been tearing my hair out for 2 days trying to figure this out and I wonder if any of you could help? I am trying to post an XML string to a server and they state 'All XML requests should be sent to our server with the 'xml' parameter name using the HTTP POST method'. I have tried numerous way...
Dean
1

votes
2

answer
688

Views

Test Laravel API on localhost cannot get response

So have this laravel get product api that works if i called it from the browser as you can see from this image here is the curl code chunk that tried to get this json response $url = 'http://localhost:8000/api/products'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_TIMEOUT, 5); curl_setopt($ch,...
xeravim
1

votes
1

answer
343

Views

Sending wordpress form data via curl using POST

I need to insert the following code into POST using CURL: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://www.bmby.com/shared/AddClient/index.php'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_REFERER, 'http://xxxxxxxx/'); $dat...
eavinu
1

votes
0

answer
702

Views

curl request with authorization header in R

curl --include \ --header 'Authorization: Basic NGEwMGZmMjItY2NkNy0xMWUzLTk5ZDUtMDAwYzI5NDBlNjJj' \ 'https://onesignal.com/api/v1/notifications?app_id={appId}' I am looking at RCurl package but fail to understand a way to include the header above in api call. I would like to know how to include this...
Simran kaur
1

votes
0

answer
183

Views

what is the meaning of time_pretransfer in curl

I met a problem: curl -o /dev/null -s -w %{time_namelookup}::%{time_connect}::%{time_pretransfer}::%{time_starttransfer}::%{time_total}::%{speed_download} 'https://xxx' When I used this command to test a http link through public network, it returned data like this: 0.004::1.008::1.024::60.805::60.80...
edward zhao
1

votes
1

answer
19

Views

Converting command-line cURL where URL is piped to python

I have this command-line cURL example: curl -X PUT -H 'X-Auth-Token: $AUTH_TOKEN' \ -d '{\'data\':{\'name\':\'Device1 Callflow\', \'numbers\':[\'1001\'], \'flow\':{\'module\':\'device\',\'data\':{\'id\':\'$DEVICE_ID\'}}}}' \ http://ip.add.re.ss:8000/v2/accounts/$ACCOUNT_ID/callflows | python -mjson....
Steve Humphrey
1

votes
0

answer
857

Views

Failed to connect to : Connection refused - cURL PHP

So here's the scenario. 1) On my local machine that is running MAMP, I'm not facing any issue and I'm able to successfully get the response along with CURLINFO_HTTP_CODE=200 2) However, there is a remote server on which my PHP code is deployed. If I try to run the same thing (as I've mentioned in #1...
Abhilash
1

votes
0

answer
253

Views

How to ?$filter data using OData through WebAPI (PHP / cURL)

I'm GETing data in JSON through a WebAPI by sending cURL requests to the server - basically works. Problem starts when I'm trying to filter for a field in (sorry, layman's terms) the 2nd layer of the JSON data. Here's some example JSON data: { 'id': 'SOMEHASH', 'name': 'OPP-Name', 'actualCloseDate':...
thom_stackoverflow
1

votes
0

answer
722

Views

What does Error: TCP connection reset by peer - PHP/CURL/HTTPS issues

I am stuck here: I get this Error: TCP connection reset by peer. This is my CURL Script $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url_webpay); //curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //curl_setopt($ch, CURLOPT_TIMEOUT, 60); //curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); //curl_seto...
Aderogba Otunla
1

votes
2

answer
1.6k

Views

My private repository returns binary content on a curl GET request

Here is the request and its response: $ curl -v -X GET domain.com:5000/v2/_catalog/ Note: Unnecessary use of -X or --request, GET is already inferred. * Trying 165.227.161.233... * TCP_NODELAY set * Connected to domain.com (165.227.161.233) port 5000 (#0) > GET /v2/_catalog/ HTTP/1.1 > Host: domai...
Stephane
1

votes
1

answer
709

Views

Mailchimp api 3.0 error: “Schema describes object, array found instead” is the code or on mailchimp's end?

I need to bulk update subscribers in my mailchimp lists using mailchimp's api and subscriber lists in my database. I am trying implement the solution to the question here: Mailchimp API 3.0 Batch Subscribe but I'm getting the error {'type':'http://developer.mailchimp.com/documentation/mailchimp/gui...
400badrequest
1

votes
3

answer
92

Views

How to echo specific data from url

how to echo/print specific data from url using file_get_content. im only know basic from it here what i create for example here my content in real web title here description here casts here i want to print img src, h2 title and h2 description. what I want to achieve is load a litle information from...
jazuly aja
1

votes
1

answer
35

Views

How to connecting to the remote site with CURL and header location

I am logging from site A through CURL on site B, I get the cookies from the connection and write to file called cookie.txt. But when I pass the cookie data to do the final header redirection ('Location: http://examplesiteb.com'), it returns disconnected. The code I am using for connection is the sam...
SourceForge
1

votes
0

answer
809

Views

Curl(28): Timeout was reached

On attempting to upload some files to my web server using this script #!/bin/bash gitLastCommit=$(git show --summary --grep='Merge pull request') if [[ -z '$gitLastCommit' ]] then lastCommit=$(git log --format='%H' -n 1) else echo 'We got a Merge Request!' arr=($gitLastCommit) lastCommit=${arr[4]} f...
Harry Cameron
1

votes
1

answer
302

Views

PHP Website Curl connecting to AWS EC2 fails on timeout

I'm having some real trouble getting to the bottom of this one. The Problem I have a simple web service running on an AWS EC2 port 8080 and need to connect to it and upload a file from a website hosted on a cPanel host. The client on cPanel site uses a PHP curl command to connect: $file = fopen($tar...
Jar Half Full
1

votes
1

answer
201

Views

JSONDecodeError in SimpleJSON module when passing curl request to RASA NLU

when i am trying to send query to the server it returns this error: the query code is: curl -X POST localhost:5000/parse -d '{'q':'I am looking for Chinese food'}' | python -m json.tool File 'C:\User\AppData\Local\Programs\Python\Python36\lib\site-packages\simplejson\decoder.py', line 400, in raw_d...
SATA_CHAKRA
1

votes
0

answer
298

Views

Rlinkedin API not connecting, getting timeout error

I am trying to use the linkedin API to access some data for a project. I am following the instructions provided by https://github.com/mpiccirilli/Rlinkedin . But no matter what I do I run into a time out error: library(pacman) p_load(rvest,ggplot2,Rlinkedin,httr,curl,devtools,dplyr,devtools) in.auth
Ebrahim Adeeb
1

votes
0

answer
140

Views

“ ch.setopt(ch.HTTPPOST, data.items()) TypeError: invalid arguments to setopt” i am getting this error

When I put all my authorization data into data = { 'token': 'XXXXXXXXXXXXXXXXXXXXXXXXXXX', 'content': 'file', 'action': 'import', 'record': '', 'field': 'record_id', 'event': '', 'returnFormat': 'csv', 'file': '(pycurl.FORM_FILE, file)' } I get error at h.setopt(ch.HTTPPOST, data.items()) which say...
Himanshu Vaishnav
1

votes
0

answer
212

Views

I need help compiling libcurl as static with no dependencies

For the past week I have been trying to get libcurl to run as static using pre built packages but they require libcurl's dependencies, which I don't have. All of the dependencies don't have any pre built packages so I would have to compile every single one from source, and I have never compiled a li...
bucklebeejohnson

View additional questions