Common Lisp Package: COM.INFORMATIMAGO.COMMON-LISP.HTTP.HQUERY

This packages exports utility routines for web applications. License: AGPL3 Copyright Pascal J. Bourguignon 2007 - 2012 This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>

README:

FUNCTION

Public

BUILD-QUERY (&REST FIELD-VALUE)

RETURN: A formated string containing the field=value&field=value… EXAMPLE: (build-query :first-name "john" :surname "doe") --> "first%2Dname=john&surname=doe"

QUERY-ARGUMENT (NAME QUERY-ARGUMENTS)

RETURN: The value of the QUERY-STRING argument named NAME.

QUERY-ESCAPE (STRING)

RETURN: A string where the spaces are replaced by '+' and other unsavory characters are replaced by %HL sequences.

QUERY-PARSE (QUERY-STRING)

RETURN: the QUERY-ARGUMENTS, a list of lists (variable . value) found in the HTML CGI QUERY-STRING.

QUERY-UNESCAPE (QPART)

RETURN: A string where the + are replaced by spaces and the %HL are replaced by the caracter whose code is HL in hexadecimal.