Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for custom verbs #1122

Open
GitSparTV opened this issue Oct 11, 2024 · 1 comment
Open

Support for custom verbs #1122

GitSparTV opened this issue Oct 11, 2024 · 1 comment

Comments

@GitSparTV
Copy link

Is your feature request related to a problem?

I'm using car for CalDAV client. CalDAV as a WebDAV variation uses different set of HTTP verbs such as:

  • PROPFIND
  • PROPPATCH
  • MKCOL
  • COPY
  • MOVE
  • LOCK
  • UNLOCK

Not to mention we don't have all regular http verbs. See the list in Boost.

Possible Solution

Add a method to set custom verb or add all verbs.

Alternatives

The closest I can get without writing curl myself:

        session.PrepareGet(); // Writes url and other options. I'm calling it because prepareCommon is private.
        auto holder = session.GetCurlHolder();

        curl_easy_setopt(holder->handle, CURLOPT_CUSTOMREQUEST, "PROPFIND");

        const CURLcode curl_error = curl_easy_perform(holder->handle);

        return session.Complete(curl_error);

Additional Context

No response

@COM8
Copy link
Member

COM8 commented Oct 18, 2024

Would be interesting but right now there is now plan to add this functionality. But I would be more than happy to accept a PR adding this functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants