Questions tagged [curl-commandline]

Curl commandline is all about the commandline parameters those use to pass to the curl executable from the console.

Curl is a very powerful executable built using libcurl library. This runs as a commandline application from the console(shell, cmd, etc). It has numerous number of commandline parameters which help the users in various purposes.

Few examples of the curl commandline are:

Get html source of a web page:

curl http://www.example.com

Save html source into a file:

curl -o output.html http://www.example.com

A detail document of the curl commandline can be found from the Curl's Man Page.

22 questions
47
votes
6 answers

To run curl command on postman getting error as Error while importing Curl: arg.startsWith is not a function

I have a curl link which is successfully run with terminal but i want to convert it as a POSTMAN request where link is, curl -v --silent -H "Accept: application/vnd.docker.distribution.manifest.v2+json" -X GET -u :
neha jain
  • 471
  • 1
  • 4
  • 5
21
votes
4 answers

How Can I Post Files and JSON Data Together With Curl?

I've been posting a file with this curl command: curl -i -F file=@./File.xlsm -F name=file -X POST http://example.com/new_file/ Now I want to send some information about the file (as JSON) along with the file. curl -i -H "Content-Type:…
Jason Champion
  • 2,670
  • 4
  • 35
  • 55
18
votes
4 answers

Curl Error 56 "Failure when receiving data from the peer" while sending .tar.gz File

I have a problem with this CURL call: curl -X POST \ --data-binary '@File01.tar.gz' \ http://website.intra.prova.it/gore-orgac/PINGU/TEST/lots/Test_017/content/files/File02.tar.gz And I receive this error: curl: (56) Failure when…
Davide C
  • 830
  • 2
  • 11
  • 21
7
votes
0 answers

Curl PUT Request With JWT Authorization Header

I am still getting a hang of using curl for testing API request from the terminal. I have a particular issue with formatting because the API request I am attempting requires a JWT Token to be passed with every call. The request I am attempting to…
7
votes
3 answers

how to use curl --ftp-create-dirs?

Background I have been searching the Internet trying to find an example of --ftp-create-dirs. Overall my goal is to use "--ftp-create-dirs" to automatically create the necessary folders if they are not present when I upload my file. Problem The…
WorkerBee
  • 683
  • 3
  • 11
  • 22
2
votes
1 answer

What does "13:get remote references: create git ls-remote: exit status 128," error mean in Gitlab when creating a mirrored repository?

I am currently running a pipeline in Gitlab and I am trying to mirror a repo on Codecommit. My .gitlab-ci.yml file contains those commands : mirror_id=$(curl --request POST --data…
2
votes
1 answer

How to delete a file from amazon S3 bucket using cURL

I was trying to delete a file from s3 bucket which is hosted in my client's in-house storage s3.fidapp.org. I used below command but it didn't work. I'm getting below error. SignatureDoesNotMatchThe request signature we…
2
votes
2 answers

Convert curl command to PHP cURL - kaaProject

curl -v -S -u devuser:devuser123 \ -F 'notification={"applicationId":"32768","schemaId":"32771","topicId":"32768","type":"USER"};type=application/json' \ -F file=@notification.json \ 'http://localhost:8080/kaaAdmin/rest/api/sendNotification' I…
Sheng Long
  • 65
  • 7
1
vote
1 answer

how can i convert my curl command to angularjs http request

Need to convert below curl command into angular http request. command looks similar to below command. " curl -X POST --data 'username=myusername&password=mypassword' -i https://myurl.com/j_spring_security_check " In https what I suppose to use,…
Habib
  • 37
  • 8
1
vote
1 answer

How to Post Action automatically in php?

Details are here: First i will hit on this link eg. http://your.app/callback?code=abc123 then i will receive value from code variable from url then i want to redirect this url as a POST action in https://api.another.com/token …
pskkar
  • 432
  • 1
  • 4
  • 18
1
vote
2 answers

How to write php code for following CURL command?

How to write php code for following CURL command? curl -H "Authorization: Bearer oVi4yPxk1bJ64Y2qOsLJ2D2ZlC3FpK4L" https://api.url.com/v1/market/total-items.json
pskkar
  • 432
  • 1
  • 4
  • 18
1
vote
1 answer

How to USE following CURL command in java?

This is the URL curl -H "Authorization: Bearer oVi4yPxk1bJ64Y2qOsLJ2D2ZlC3FpK4L" https://api.url.com/v1/market/total-items.json I want to use it on JAVA where oVi4yPxk1bJ64Y2qOsLJ2D2ZlC3FpK4L value will be a dynamic value which i receive using a…
pskkar
  • 432
  • 1
  • 4
  • 18
1
vote
2 answers

Parameter value with space in CURL command gives 404 error

I am using jersey to create restful webservices. While using curl to consume webservices with parameter values with white space, I get 404 not found issue. What should be done to mitigate this problem. Request curl -X GET…
1
vote
1 answer

Pass user/pass to curl from a local file

I know that you can give cURL a user/pass combination using the -u flag which is great. What I'm trying to do is get the credentials from a file on the filesystem and pass that in. For example in…
Spanky
  • 5,608
  • 10
  • 39
  • 45
1
vote
1 answer

How to pass a JSON in url via cURL?

I want to do something like following: curl localhost:8080/myapp/?params={"first_key":"I'm the first value","second_key":"the second value"} This is working pretty normal when I am trying to access the page via browser, but it does not work via…
1
2