On Thu, 06 Jan 2011 23:18:09 -0200 Raphael Kubo da Costa <k...@profusion.mobi>
said:

> At Thu, 6 Jan 2011 15:34:24 +0900,
> Carsten Haitzler (The Rasterman) wrote:
> > 
> > On Tue, 28 Dec 2010 15:39:41 +0900 Carsten Haitzler (The Rasterman)
> > <ras...@rasterman.com> said:
> > 
> > http://trac.enlightenment.org/e/changeset/55926
> > 
> > comments?
> 
> Only about the ecore stuff itself, as I've never touched the rest of the
> files.

i know. i only cared about fixing up the api for 1.0 - internals can always be
changed. i just took the fastest path to getting api set up.

one thing i was hoping you'd comment on... "we have get and post... where's
put?" :)

> +#define MODE_AUTO 0
> +#define MODE_GET  1
> +#define MODE_POST 2
> 
> This looks... ugly :)
> 
> Anything agains having an enum? Plus, if both AUTO and POST have the
> same effect, why not have only POST and adapt ecore_con_url_send
> accordingly?

because i wasnt sure i'd get it right for both - and as such auto will be
killed eventually as its deprecated. :)

> +/**
> + * Sends a get request.
> + *
> + * @param url_con Connection object to perform a request on, previously
> created
> + *                with ecore_con_url_new() or ecore_con_url_custom_new().
> + * @param data    Payload (data sent on the request)
> + * @param length  Payload length. If @c -1, rely on automatic length
> + *                calculation via @c strlen() on @p data.
> + * @param content_type Content type of the payload (e.g. text/xml)
> 
> It doesn't make much sense to send Content-Length and Content-Type in
> a GET, so I think those two can be removed from the function's
> signature.
> 
> +/**
> + * Sends a post request.
> + *
> + * @param url_con Connection object to perform a request on, previously
> created
> + *                with ecore_con_url_new() or ecore_con_url_custom_new().
> + * @param data    Payload (data sent on the request)
> + * @param length  Payload length. If @c -1, rely on automatic length
> + *                calculation via @c strlen() on @p data.
> + * @param content_type Content type of the payload (e.g. text/xml)
> 
> It should be noted somewhere that passing NULL to data and 0 to length
> performs a bodyless POST.

if its an explicit post call.. isnt that obvious? :) no data - no body :)

> --
> Raphael Kubo da Costa
> ProFUSION embedded systems
> http://profusion.mobi
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to