libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] PUT and DELETE


From: Christian Grothoff
Subject: Re: [libmicrohttpd] PUT and DELETE
Date: Fri, 24 Aug 2012 19:23:56 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.6esrpre) Gecko/20120817 Icedove/10.0.6

/AFAIK, t/he only difference between PUT and POST is that PUT must be idempotent. That is a semantic distinction of relevance to your application, it changes nothing for the wire protocol or the MHD API.

MHD internally makes no distinction between PUT and POST and will pass you all of the data in the same way(s). Which way you get the PUT data depends -- just as with POST -- on the specifics of how you instructed the browser to submit it.

Happy hacking!

Christian

On 08/24/2012 06:58 PM, address@hidden wrote:
Hey all,

I noticed that the method passed to:

Function Pointer: int *MHD_AccessHandlerCallback (void *cls, struct 
MHD_Connection * connection, const char *url, const char *method, const char 
*version, const char *upload_data, size_t *upload_data_size, void **con_cls)

will always be GET, POST, PUT or DELETE.  This is all well and good for GET, 
POST, and DELETE, but for PUT I was wondering how that worked in terms of 
upload_data?  Is it the same as POST where for small chunks of data it is 
directly accessible via MHD_get_connection_values() whereas for larger requests 
it is via upload_data?

Cheers,
Mike




reply via email to

[Prev in Thread] Current Thread [Next in Thread]