httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip M. Gollucci" <pgollu...@p6m7g8.com>
Subject Re: apreq_body and apreq_param
Date Sat, 02 Sep 2006 07:35:10 GMT
Brian McQueen wrote:
> I wonder about the differences between apreq_param and apreq_body.  I
> see that apreq_param gets a particular param and returns a param
> structure, which is a bit of an  odd structure, but its a general way
> of representing the data.  When using apreq_body a more intuitive,
> string based key/value style is provided through the returned table.
> The table interface is easy to use and makes sense, but I am a bit
> confused about the emphasis on key/value techniques with apreq_body,
> versus some other technique when data is retrieved via apreq_param.
> What is the intention behind these two different designs?
> 
> Brian McQueen
Notice the difference of WHAT they parse.

APREQ_DECLARE(apreq_param_t *)apreq_param(apreq_handle_t *req, const char *key);
/**
 * Find the first query string parameter or body parameter with the
 * specified name.  The match is case-insensitive.
 * returns The first matching parameter (with args searched first) or NULL.
 */
PERL Land: http://httpd.apache.org/apreq/docs/libapreq2/group__apreq__xs__apr__request.html#param


static APR_INLINE
apr_status_t apreq_body(apreq_handle_t *req, const apr_table_t **t)

/**
 * Expose the parsed "request body" associated to this handle.
 * The resulting table(t), which will either be NULL or a
 * valid table object on return.
 */
PERL Land: http://httpd.apache.org/apreq/docs/libapreq2/group__apreq__xs__apr__request.html#body

HTH

------------------------------------------------------------------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

"In all that I've done wrong I know I must have done something right to
deserve a hug every morning and butterfly kisses at night."
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /
 / /|_/ / // /\ \/ /_/ / /__
/_/  /_/\_, /___/\___\_\___/
       <___/

Mime
View raw message