Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8781175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:13:55+00:00 2026-06-13T20:13:55+00:00

I came across this service that will format my local markdown files rather nicely.

  • 0

I came across this service that will format my local markdown files rather nicely. Per the example, it is easy to get a nicely formatted response with a sample curl command.

What I am looking to do is utilize some of the options available, namely the version and “name” parameters. How would I go about structuring the curl command? Below are the code samples that I have used within R.

This code works nicely, but lacks the specified options:

doc.up <- "curl -X POST --data-urlencode content@test-markdown.md  \ http://documentup.com/compiled > index.html"
system(doc.up)

I tried to specify the name option, but no dice:

doc.up <- "curl -X POST --data-urlencode name@mynamevar content@test-markdown.md  \ http://documentup.com/compiled > index.html"
system(doc.up)

Any help will be greatly appreciated!

EDIT: Per some of the suggestions below, I have attempted a few ways to use Rcurl and HTTR. I am using the default Markdown template within Rstudio, but for completeness sake, I saved it as test-markdown.Rmd and compiled it test-markdown.md.

Using RCurl, I attempted:

## attempt 1
f <- paste(readLines('test-markdown.md'),collapse="\n" )
h <- dynCurlReader()
wp <- curlPerform(url="http://documentup.com/compiled", 
            postfields = c(content=f))
## attempt 2
postForm("http://documentup.com/compiled",
         "content" = fileUpload('test-markdown.md'))

Using httr, I tried:

## attempt 3
tmp <- POST("http://documentup.com/compiled", body = list(content= upload_file(f)))
content(tmp)

## attempt 4
tmp <- POST("http://documentup.com/compiled", body = list(content= upload_file("test-markdown.md")))
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T20:13:56+00:00Added an answer on June 13, 2026 at 8:13 pm

    The following code works for me:

    library(httr)
    
    url <- "http://documentup.com/compiled"
    contents <- readLines("README.md")
    
    resp <- POST(url, body = list(content = contents, name = "plyr"))
    content(resp)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I came across this service that allowed distributing promo codes in a way that
I came across this one liner that appears to work: stop-service -inputobject $(get-service -ComputerName
I came across this example class http://www.boost.org/doc/libs/1_49_0/libs/smart_ptr/sp_techniques.html#as_lock and I'm struggling with the syntax. class
While debugging a WCF service I came across this issue. I use an HttpURLConnection
Recently came across with a weird scenario, that dependency injection for a service within
Came across this code: <?php require_once 'HTTP/Session/Container/DB.php'; $s = new HTTP_Session_Container_DB('mysql://user:password@localhost/db'); ini_get('session.auto_start') or session_start();
I came across this Linq to Sql code in an application I am maintaining:
I came across this due to a bug in my code and I'm curious
I came across this problem when I want to check what I input is
I came across this line in a MySQL script `other_validator` varchar(5000) NOT NULL DEFAULT

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.