The http-body Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The http-body Reference Manual

This is the http-body Reference Manual, version 0.1, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 11:57:08 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

HTTP-Body

Build Status

HTTP-Body parses HTTP POST data and returns POST parameters. It supports application/x-www-form-urlencoded, application/json, and multipart/form-data.

Usage

http-body package exports only a function parse, which takes exact 2 arguments -- a string of Content-Type and a stream of HTTP POST data.

(http-body:parse "application/x-www-form-urlencoded"
                 body-stream)
;=> (("name" . "Eitaro"))
;   T

It returns parsed parameters in an association list.

If the Content-Type of first argument isn't supported, it returns NIL.

(http-body:parse "text/plain" body-stream)
;=> NIL
;   NIL

Installation

mkdir -p ~/common-lisp
cd ~/common-lisp
git clone https://github.com/fukamachi/xsubseq
git clone https://github.com/fukamachi/fast-http
(ql:quickload :http-body)

Author

Copyright

Copyright (c) 2014 Eitaro Fukamachi

License

Licensed under the BSD 2-Clause License.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 http-body

Author

Eitaro Fukamachi

License

BSD 2-Clause

Description

HTTP POST data parser for Common Lisp

Long Description

# HTTP-Body

[![Build Status](https://travis-ci.org/fukamachi/http-body.svg?branch=master)](https://travis-ci.org/fukamachi/http-body)

HTTP-Body parses HTTP POST data and returns POST parameters. It supports application/x-www-form-urlencoded, application/json, and multipart/form-data.

## Usage

‘http-body‘ package exports only a function ‘parse‘, which takes exact 2 arguments – a string of Content-Type and a stream of HTTP POST data.

“‘common-lisp
(http-body:parse "application/x-www-form-urlencoded"
body-stream)
;=> (("name" . "Eitaro"))
; T
“‘

It returns parsed parameters in an association list.

If the Content-Type of first argument isn’t supported, it returns ‘NIL‘.

“‘common-lisp
(http-body:parse "text/plain" body-stream)
;=> NIL
; NIL
“‘

## Installation

“‘
mkdir -p ~/common-lisp
cd ~/common-lisp
git clone https://github.com/fukamachi/xsubseq
git clone https://github.com/fukamachi/fast-http
“‘

“‘common-lisp
(ql:quickload :http-body)
“‘

## Author

* Eitaro Fukamachi

## Copyright

Copyright (c) 2014 Eitaro Fukamachi

## License

Licensed under the BSD 2-Clause License.

Version

0.1

Dependencies
Source

http-body.asd (file)

Component

src (module)


Next: , Previous: , Up: Top   [Contents][Index]

3 Modules

Modules are listed depth-first from the system components tree.


Previous: , Up: Modules   [Contents][Index]

3.1 http-body/src

Parent

http-body (system)

Location

src/

Components

Next: , Previous: , Up: Top   [Contents][Index]

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.1 http-body.asd

Location

http-body.asd

Systems

http-body (system)

Packages

http-body-asd


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.2 http-body/src/http-body.lisp

Dependencies
Parent

src (module)

Location

src/http-body.lisp

Packages

http-body

Exported Definitions

parse (function)

Internal Definitions

*content-type-map* (special variable)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.3 http-body/src/multipart.lisp

Dependency

util.lisp (file)

Parent

src (module)

Location

src/multipart.lisp

Packages

http-body.multipart

Exported Definitions

multipart-parse (function)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.4 http-body/src/json.lisp

Dependency

util.lisp (file)

Parent

src (module)

Location

src/json.lisp

Packages

http-body.json

Exported Definitions

json-parse (function)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.5 http-body/src/urlencoded.lisp

Dependency

util.lisp (file)

Parent

src (module)

Location

src/urlencoded.lisp

Packages

http-body.urlencoded

Exported Definitions

urlencoded-parse (function)


Previous: , Up: Lisp files   [Contents][Index]

4.1.6 http-body/src/util.lisp

Parent

src (module)

Location

src/util.lisp

Packages

http-body.util

Exported Definitions
Internal Definitions

parse-content-type (function)


Next: , Previous: , Up: Top   [Contents][Index]

5 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

5.1 http-body-asd

Source

http-body.asd

Use List

Next: , Previous: , Up: Packages   [Contents][Index]

5.2 http-body

Source

http-body.lisp (file)

Use List

common-lisp

Exported Definitions

parse (function)

Internal Definitions

*content-type-map* (special variable)


Next: , Previous: , Up: Packages   [Contents][Index]

5.3 http-body.multipart

Source

multipart.lisp (file)

Use List

common-lisp

Exported Definitions

multipart-parse (function)


Next: , Previous: , Up: Packages   [Contents][Index]

5.4 http-body.json

Source

json.lisp (file)

Use List

common-lisp

Exported Definitions

json-parse (function)


Next: , Previous: , Up: Packages   [Contents][Index]

5.5 http-body.urlencoded

Source

urlencoded.lisp (file)

Use List

common-lisp

Exported Definitions

urlencoded-parse (function)


Previous: , Up: Packages   [Contents][Index]

5.6 http-body.util

Source

util.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

parse-content-type (function)


Next: , Previous: , Up: Top   [Contents][Index]

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Exported definitions


Previous: , Up: Exported definitions   [Contents][Index]

6.1.1 Functions

Function: detect-charset CONTENT-TYPE &optional DEFAULT
Package

http-body.util

Source

util.lisp (file)

Function: json-parse CONTENT-TYPE CONTENT-LENGTH STREAM
Package

http-body.json

Source

json.lisp (file)

Function: multipart-parse CONTENT-TYPE CONTENT-LENGTH STREAM
Package

http-body.multipart

Source

multipart.lisp (file)

Function: parse CONTENT-TYPE CONTENT-LENGTH STREAM
Package

http-body

Source

http-body.lisp (file)

Function: slurp-stream STREAM &optional CONTENT-LENGTH
Package

http-body.util

Source

util.lisp (file)

Function: urlencoded-parse CONTENT-TYPE CONTENT-LENGTH STREAM
Package

http-body.urlencoded

Source

urlencoded.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

6.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.1 Special variables

Special Variable: *content-type-map*
Package

http-body

Source

http-body.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

6.2.2 Functions

Function: parse-content-type CONTENT-TYPE
Package

http-body.util

Source

util.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   H   L   M  
Index Entry  Section

F
File, Lisp, http-body.asd: The http-body<dot>asd file
File, Lisp, http-body/src/http-body.lisp: The http-body/src/http-body<dot>lisp file
File, Lisp, http-body/src/json.lisp: The http-body/src/json<dot>lisp file
File, Lisp, http-body/src/multipart.lisp: The http-body/src/multipart<dot>lisp file
File, Lisp, http-body/src/urlencoded.lisp: The http-body/src/urlencoded<dot>lisp file
File, Lisp, http-body/src/util.lisp: The http-body/src/util<dot>lisp file

H
http-body.asd: The http-body<dot>asd file
http-body/src: The http-body/src module
http-body/src/http-body.lisp: The http-body/src/http-body<dot>lisp file
http-body/src/json.lisp: The http-body/src/json<dot>lisp file
http-body/src/multipart.lisp: The http-body/src/multipart<dot>lisp file
http-body/src/urlencoded.lisp: The http-body/src/urlencoded<dot>lisp file
http-body/src/util.lisp: The http-body/src/util<dot>lisp file

L
Lisp File, http-body.asd: The http-body<dot>asd file
Lisp File, http-body/src/http-body.lisp: The http-body/src/http-body<dot>lisp file
Lisp File, http-body/src/json.lisp: The http-body/src/json<dot>lisp file
Lisp File, http-body/src/multipart.lisp: The http-body/src/multipart<dot>lisp file
Lisp File, http-body/src/urlencoded.lisp: The http-body/src/urlencoded<dot>lisp file
Lisp File, http-body/src/util.lisp: The http-body/src/util<dot>lisp file

M
Module, http-body/src: The http-body/src module

Jump to:   F   H   L   M  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   D   F   J   M   P   S   U  
Index Entry  Section

D
detect-charset: Exported functions

F
Function, detect-charset: Exported functions
Function, json-parse: Exported functions
Function, multipart-parse: Exported functions
Function, parse: Exported functions
Function, parse-content-type: Internal functions
Function, slurp-stream: Exported functions
Function, urlencoded-parse: Exported functions

J
json-parse: Exported functions

M
multipart-parse: Exported functions

P
parse: Exported functions
parse-content-type: Internal functions

S
slurp-stream: Exported functions

U
urlencoded-parse: Exported functions

Jump to:   D   F   J   M   P   S   U  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
S  
Index Entry  Section

*
*content-type-map*: Internal special variables

S
Special Variable, *content-type-map*: Internal special variables

Jump to:   *  
S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   H   P   S  
Index Entry  Section

H
http-body: The http-body system
http-body: The http-body package
http-body-asd: The http-body-asd package
http-body.json: The http-body<dot>json package
http-body.multipart: The http-body<dot>multipart package
http-body.urlencoded: The http-body<dot>urlencoded package
http-body.util: The http-body<dot>util package

P
Package, http-body: The http-body package
Package, http-body-asd: The http-body-asd package
Package, http-body.json: The http-body<dot>json package
Package, http-body.multipart: The http-body<dot>multipart package
Package, http-body.urlencoded: The http-body<dot>urlencoded package
Package, http-body.util: The http-body<dot>util package

S
System, http-body: The http-body system

Jump to:   H   P   S