[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libmicrohttpd] How to return http status only
From: |
Christian Grothoff |
Subject: |
Re: [libmicrohttpd] How to return http status only |
Date: |
Thu, 3 Dec 2015 07:57:00 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.3.0 |
Hi Mario,
Yes, this seems to do what you want it to, and yes, this is also the
right way to generate an 'empty' response.
Happy hacking!
Christian
On 12/03/2015 05:26 AM, Mario Valle wrote:
> Pardon my ignorance,
> I want to respond to a successful DELETE with only the status
> MHD_HTTP_NO_CONTENT and no content. Is the following fragment correct?
>
> response = MHD_create_response_from_buffer(0, "", MHD_RESPMEM_PERSISTENT);
> MHD_queue_response(connection, MHD_HTTP_NO_CONTENT, response);
> MHD_destroy_response(response);
>
> That is, there is no way to send a response without creating an empty
> message. Is it true? Well, I'm not sure if my concern matches with the
> HTTP protocol...
>
> Thanks for helping!
> mario
>
signature.asc
Description: OpenPGP digital signature