qse/ase/utl/http.h

67 lines
886 B
C
Raw Normal View History

2008-02-03 05:27:18 +00:00
/*
2008-03-18 04:27:02 +00:00
* $Id: http.h 132 2008-03-17 10:27:02Z baconevi $
*
* {License}
2008-02-03 05:27:18 +00:00
*/
#ifndef _ASE_UTL_HTTP_H_
#define _ASE_UTL_HTTP_H_
#include <ase/cmn/types.h>
#include <ase/cmn/macros.h>
/* returns the type of http method */
typedef struct ase_http_req_t ase_http_req_t;
typedef struct ase_http_hdr_t ase_http_hdr_t;
struct ase_http_req_t
{
ase_char_t* method;
struct
{
ase_char_t* ptr;
ase_size_t len;
} path;
struct
{
ase_char_t* ptr;
ase_size_t len;
} args;
struct
{
char major;
char minor;
} vers;
};
struct ase_http_hdr_t
{
struct
{
ase_char_t* ptr;
ase_size_t len;
} name;
struct
{
ase_char_t* ptr;
ase_size_t len;
} value;
};
2008-02-03 05:31:39 +00:00
#ifdef __cplusplus
extern "C" {
#endif
ase_char_t* ase_parsehttpreq (ase_char_t* buf, ase_http_req_t* req);
ase_char_t* ase_parsehttphdr (ase_char_t* buf, ase_http_hdr_t* hdr);
#ifdef __cplusplus
}
#endif
2008-02-03 05:27:18 +00:00
#endif