GNURLOPT_PUT(3)

πŸ“¦ version 7.72.0, in nixos 26.05, nixpkgs unstable

✨ GNURLOPT_PUT(3) β€” the curl_easy_setopt options page, bestie edition ✨

okay so real talk, we're in the curl_easy_setopt options corner of the gnurl manual and this one is a little... vintage πŸ’…


πŸŽ€ NAME πŸŽ€

CURLOPT_PUT β€” the one that makes an HTTP PUT request 🫢

(yes the page is called GNURLOPT_PUT, yes the option is CURLOPT_PUT, that's just how it is, iykyk)

🌸 SYNOPSIS 🌸

#include <gnurl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PUT, long put);

πŸ¦‹ DESCRIPTION πŸ¦‹

so you set this parameter to 1 and that tells the library "bestie, use HTTP PUT to transfer the data" πŸ”₯ that's the whole vibe.

the data itself is not set here β€” nope β€” you gotta set that with CURLOPT_READDATA(3) and CURLOPT_INFILESIZE(3). those two are the main characters of the actual data transfer, this option is just the sign on the door πŸšͺ

πŸ’€ ⚠️ deprecated alert ⚠️ this option is deprecated since version 7.12.1. Use CURLOPT_UPLOAD(3) instead! not a suggestion, it's literally in the page fr fr.

⭐ DEFAULT ⭐

0, disabled. did nothing, showed up for none of the drama πŸ™ˆ

🌈 PROTOCOLS 🌈

HTTP β€” that's it, that's the list πŸŽ€

πŸ‘‘ AVAILABILITY πŸ‘‘

Deprecated since 7.12.1. Do not use. that's not me being dramatic, that is word-for-word the manual 😭 please use CURLOPT_UPLOAD(3).

πŸ’œ RETURN VALUE πŸ’œ

Returns CURLE_OK if HTTP is supported πŸ’– and CURLE_UNKNOWN_OPTION if not πŸ’€ slay.

πŸ“ SEE ALSO πŸ“

(yes there's a trailing comma, we don't edit the archives ✨)


and that's the page!! πŸ’… brought to you by libcurl 7.37.0, dated 17 Jun 2014 β€” oldie but a goodie, go use CURLOPT_UPLOAD(3) tho bestie 🫢🧚

πŸ“¦ where this page comes from