File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
libs/openFrameworks/utils Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -338,8 +338,18 @@ ofHttpResponse ofURLFileLoaderImpl::handleRequest(const ofHttpRequest & request)
338
338
if (request.method == ofHttpRequest::GET) {
339
339
curl_easy_setopt (curl.get (), CURLOPT_HTTPGET, 1 );
340
340
curl_easy_setopt (curl.get (), CURLOPT_POST, 0 );
341
+ curl_easy_setopt (curl.get (), CURLOPT_PUT, 0 );
342
+ }
343
+ else if (request.method == ofHttpRequest::PUT) {
344
+ curl_easy_setopt (curl.get (), CURLOPT_UPLOAD, 1 );
345
+ curl_easy_setopt (curl.get (), CURLOPT_PUT, 1 );
346
+ curl_easy_setopt (curl.get (), CURLOPT_POST, 0 );
347
+ curl_easy_setopt (curl.get (), CURLOPT_HTTPGET, 0 );
348
+ }
349
+ else if (request.method == ofHttpRequest::POST) {
341
350
} else {
342
351
curl_easy_setopt (curl.get (), CURLOPT_POST, 1 );
352
+ curl_easy_setopt (curl.get (), CURLOPT_PUT, 0 );
343
353
curl_easy_setopt (curl.get (), CURLOPT_HTTPGET, 0 );
344
354
}
345
355
Original file line number Diff line number Diff line change @@ -31,9 +31,10 @@ class ofHttpRequest {
31
31
int getID ();
32
32
33
33
// / HTTP request type
34
- enum Method {
35
- GET, // /< request data from a specified resource (via url)
36
- POST // /< submit data to be processed to a specified resource (via url)
34
+ enum Method{
35
+ GET, // < request data from a specified resource (via url)
36
+ POST, // < submit data to be processed to a specified resource (via url)
37
+ PUT
37
38
} method;
38
39
39
40
private:
You can’t perform that action at this time.
0 commit comments