Skip to content

A small project that allows to send ordered form data in http requests

Notifications You must be signed in to change notification settings

justhyped/OrderedForm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

OrderedForm

Installation

Run the following command in your project folder: go get github.com/justhyped/OrderedForm

Usage

package main

import (
	"github.com/justhyped/OrderedForm"
	"net/http"
	"strings"
)

func main() {
	// create the form
	form := new(OrderedForm.OrderedForm)
	form.Set("key", "value")
	form.Set("key1", "value1")

	// create a post request
	req, _ := http.NewRequest("POST", "url here", strings.NewReader(form.URLEncode()))

	// form.URLEncode will return key=value&key1=value1. the values are properly query escapep
	// and it's order is maintained.	
}

License

MIT

About

A small project that allows to send ordered form data in http requests

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages