rawhttp

package
v0.0.0-...-8ea42c6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2016 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package rawhttp implements conveniences related with HTTP request/reply operations.

--
*
*                               Copyright (C) 2015 by Rafael Santiago
*
* This is a free software. You can redistribute it and/or modify under
* the terms of the GNU General Public License version 2.
*

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFieldsFromGet

func GetFieldsFromGet(buffer string) map[string]string

GetFieldsFromGet returns a map containing all fields in a HTTP get.

func GetFieldsFromPost

func GetFieldsFromPost(buffer string) map[string]string

GetFieldsFromPost returns a map containing all fields in a HTTP post.

func GetHTTPFieldFromBuffer

func GetHTTPFieldFromBuffer(field, buffer string) string

GetHTTPFieldFromBuffer returns data carried by some HTTP field inside a HTTP request.

func MakeReplyBuffer

func MakeReplyBuffer(buffer string, statusCode int, closeConnection bool) []byte

MakeReplyBuffer assembles the reply buffer based on the statusCode.

func MakeReplyBufferByFilePath

func MakeReplyBufferByFilePath(filePath string, statusCode int, closeConnection bool) []byte

MakeReplyBufferByFilePath assembles the reply buffer base on the file data and the statusCode.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL