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 4622728
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:53:05+00:00 2026-05-22T02:53:05+00:00

Specifically I want to call MKCOL through HttpClient to create a folder for Apache

  • 0

Specifically I want to call MKCOL through HttpClient to create a folder for Apache Jackrabbit through the Sling REST API.

I’ve tried variants of

BasicHttpEntityEnclosingRequest request = new BasicHttpEntityEnclosingRequest("MKCOL", restUrl);

But no dice so far. I’m guessing this is less difficult than I’m making it.

I also see there is MkColMethod for something like

MkColMethod mkColMethod = new MkColMethod(restUrl);

But I don’t know how to utilize this. I think it may have worked with a previous version of HttpClient. I’m using 4.x

  • 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-05-22T02:53:06+00:00Added an answer on May 22, 2026 at 2:53 am

    Best is to look at the Sling integration tests, which use Sling’s RESTful APIs to create content.

    The “old” SlingIntegrationTestClient class is used to test Sling itself and uses httpclient 3.x to create content. It is used by the tests found here, so you can find examples there.

    The “new” SlingClient class is meant to be a cleaner and simpler re-implementation of that, used by the Sling testing tools described at http://sling.apache.org/site/sling-testing-tools.html . It uses httpclient 4.x which has a slightly different API.

    The SlingClient.mkdir and mkdirs methods do use the MKCOL method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Specifically, I want to create a backup of a list, then make some changes
Specifically, In OSX 10.6 from a system call, I want to open a file
I want to test for large call stacks. Specifically, I want a console warning
I specifically want to call Android, when in offline mode, for a large chunk
I specifically want to add the style of background-color to the <body> tag of
Specifically I want to know what the data structure for the imports (idata) section
Specifically I want to change the text and background colors. Is it possible to
More specifically I want to test whether Oracle ODP.Net is installed on a machine.
I'm trying to write a plugin that will extend InheritedResources . Specifically I want
I want to specifically invoke the base class method; what's the most concise way

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.