-
-
Save Gab-km/5003050 to your computer and use it in GitHub Desktop.
Revisions
-
Gab-km revised this gist
Feb 21, 2013 . 1 changed file with 1 addition and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,17 +4,14 @@ HttpStatus.fs です。インストール方法は 適当にコンパイルしてください。 **See also** `httpstatus コマンドで、HTTP のステータスコードをすばやくしらべる! - tokuhirom's blog. <http://blog.64p.org/entry/2013/02/21/121830>`_ `Big Sky :: httpstatus コマンドで、HTTP のステータスコードをすばやくしらべる! <http://mattn.kaoriya.net/software/vim/20130221123856.htm>`_ `httpstatus コマンドで、HTTP のステータスコードをすばやくしらべる! - ( ꒪⌓꒪) ゆるよろ日記 <http://yuroyoro.hatenablog.com/entry/2013/02/21/144004>`_ -
Gab-km revised this gist
Feb 21, 2013 . 1 changed file with 10 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,11 +6,17 @@ HttpStatus.fs です。インストール方法は 適当にコンパイルし ** See also ** `httpstatus コマンドで、HTTP のステータスコードをすばやくしらべる! - tokuhirom's blog. <http://blog.64p.org/entry/2013/02/21/121830>`_ `Big Sky :: httpstatus コマンドで、HTTP のステータスコードをすばやくしらべる! <http://mattn.kaoriya.net/software/vim/20130221123856.htm>`_ `httpstatus コマンドで、HTTP のステータスコードをすばやくしらべる! - ( ꒪⌓꒪) ゆるよろ日記 <http://yuroyoro.hatenablog.com/entry/2013/02/21/144004>`_ `httpstatusコマンドで、HTTPのステータスコードをすばやくしらべる! - YAMAGUCHI::weblog <http://ymotongpoo.hatenablog.com/entry/2013/02/21/160646>`_ -
Gab-km revised this gist
Feb 21, 2013 . 1 changed file with 12 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,4 +2,15 @@ しかし、僕は初心者なので、なかなか覚えきれていないので、HTTPのステータスコードをさがすのに便利なツールを用意しました。 HttpStatus.fs です。インストール方法は 適当にコンパイルしてください。 ** See also ** * `httpstatus コマンドで、HTTP のステータスコードをすばやくしらべる! - tokuhirom's blog. <http://blog.64p.org/entry/2013/02/21/121830>`_ * `Big Sky :: httpstatus コマンドで、HTTP のステータスコードをすばやくしらべる! <http://mattn.kaoriya.net/software/vim/20130221123856.htm>`_ * `httpstatus コマンドで、HTTP のステータスコードをすばやくしらべる! - ( ꒪⌓꒪) ゆるよろ日記 <http://yuroyoro.hatenablog.com/entry/2013/02/21/144004>`_ * `httpstatusコマンドで、HTTPのステータスコードをすばやくしらべる! - YAMAGUCHI::weblog <http://ymotongpoo.hatenablog.com/entry/2013/02/21/160646>`_ -
Gab-km revised this gist
Feb 21, 2013 . 1 changed file with 1 addition and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,5 @@ 一般的な Web Programmer ならば、HTTP Status code はすべて暗記していると聞きました。 しかし、僕は初心者なので、なかなか覚えきれていないので、HTTPのステータスコードをさがすのに便利なツールを用意しました。 HttpStatus.fs です。インストール方法は 適当にコンパイルしてください。 -
Gab-km revised this gist
Feb 21, 2013 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,6 @@ httpstatus コマンドで、HTTP のステータスコードをすばやくしらべる! ----------------------------------------------------------------- 一般的な Web Programmer ならば、HTTP Status code はすべて暗記していると聞きました。 しかし、僕は初心者なので、なかなか覚えきれていないので、HTTPのステータスコードをさがすのに便利なツールを用意しました。 -
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,85 @@ type HttpStatus = { Code: string; Message: string } override self.ToString () = sprintf "%s %s" self.Code self.Message let httpStatus code message = { Code = code; Message = message } let httpStatusList =[ httpStatus "100" "Continue"; httpStatus "101" "Switching Protocols"; httpStatus "102" "Processing"; httpStatus "200" "OK"; httpStatus "201" "Created"; httpStatus "202" "Accepted"; httpStatus "203" "Non-Authoritative Information"; httpStatus "204" "No Content"; httpStatus "205" "Reset Content"; httpStatus "206" "Partial Content"; httpStatus "207" "Multi-Status"; httpStatus "208" "Already Reported"; httpStatus "300" "Multiple Choices"; httpStatus "301" "Moved Permanently"; httpStatus "302" "Found"; httpStatus "303" "See Other"; httpStatus "304" "Not Modified"; httpStatus "305" "Use Proxy"; httpStatus "307" "Temporary Redirect"; httpStatus "400" "Bad Request"; httpStatus "401" "Unauthorized"; httpStatus "402" "Payment Required"; httpStatus "403" "Forbidden"; httpStatus "404" "Not Found"; httpStatus "405" "Method Not Allowed"; httpStatus "406" "Not Acceptable"; httpStatus "407" "Proxy Authentication Required"; httpStatus "408" "Request Timeout"; httpStatus "409" "Conflict"; httpStatus "410" "Gone"; httpStatus "411" "Length Required"; httpStatus "412" "Precondition Failed"; httpStatus "413" "Request Entity Too Large"; httpStatus "414" "Request-URI Too Large"; httpStatus "415" "Unsupported Media Type"; httpStatus "416" "Request Range Not Satisfiable"; httpStatus "417" "Expectation Failed"; httpStatus "418" "I'm a teapot"; httpStatus "422" "Unprocessable Entity"; httpStatus "423" "Locked"; httpStatus "424" "Failed Dependency"; httpStatus "425" "No code"; httpStatus "426" "Upgrade Required"; httpStatus "428" "Precondition Required"; httpStatus "429" "Too Many Requests"; httpStatus "431" "Request Header Fields Too Large"; httpStatus "449" "Retry with"; httpStatus "500" "Internal Server Error"; httpStatus "501" "Not Implemented"; httpStatus "502" "Bad Gateway"; httpStatus "503" "Service Unavailable"; httpStatus "504" "Gateway Timeout"; httpStatus "505" "HTTP Version Not Supported"; httpStatus "506" "Variant Also Negotiates"; httpStatus "507" "Insufficient Storage"; httpStatus "509" "Bandwidth Limit Exceeded"; httpStatus "510" "Not Extended"; httpStatus "511" "Network Authentication Required" ] let showStatus key = match List.tryFind (fun hs -> hs.Code = key) httpStatusList with | Some hs -> hs.ToString() |> printfn "%s" | _ -> let toStringAll xs = List.map (fun x -> x.ToString()) xs match List.filter (fun hs -> hs.Code.Contains key) httpStatusList with | [] -> match List.filter (fun hs -> hs.Message.Contains key) httpStatusList with | [] -> toStringAll httpStatusList | hss -> toStringAll hss | hss -> toStringAll hss |> List.iter (printfn "%s") [<EntryPoint>] let main args = if args.Length <> 1 then showStatus "" else showStatus args.[0] 0 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ 一般的な Web Programmer ならば、HTTP Status code はすべて暗記していると聞きました。 しかし、僕は初心者なので、なかなか覚えきれていないので、HTTPのステータスコードをさがすのに便利なツールを用意しました。 HttpStatus.fs です。インストール方法は 適当にコンパイルしてください。