Solved

Use wget instead of curl to submit attachment

Posted on 2013-10-31
1
295 Views
Last Modified: 2013-11-04
This does exactly what I want it to:
curl -X POST http://example.com/xyz -d '{"_id":"123", "_attachments":{"foo.txt":{"content_type":"text\/plain","data": "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ="}}}' -H "Content-Type: application/json"

Open in new window

It submits "This is a base64 encoded text" as an attachment.  

How can I do exactly the same thing but with wget instead of cURL?
0
Comment
Question by:hankknight
1 Comment
 
LVL 50

Accepted Solution

by:
Steve Bink earned 500 total points
ID: 39617955
You can use the --post-data and --post-file options, but there are limitations.  I recommend reading the docs for usage and examples.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now