package method import ( "sourcecode.social/reiver/go-rfc2616/token" ) // Bytes returns the 'Method', as defiend by IETF RFC-2616. // // Method = "OPTIONS" // | "GET" // | "HEAD" // | "POST" // | "PUT" // | "DELETE" // | "TRACE" // | "CONNECT" // | extension-method // // extension-method = token // // Which, in practice, can be simplified to: // // Method = token // // And 'token' is defined as: // // token = 1* // // CHAR = // // CTL = // // separators = "(" | ")" | "<" | ">" | "@" // | "," | ";" | ":" | "\" | <"> // | "/" | "[" | "]" | "?" | "=" // | "{" | "}" | SP | HT // // SP = // // HT = func Bytes(p []byte) ([]byte, []byte, bool) { return token.Bytes(p) }