Solved

Use wget instead of curl to submit attachment

Posted on 2013-10-31
1
301 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Utilizing an array to gracefully append to a list of EmailAddresses
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é.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

856 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