Skip to content

Commit

Permalink
improper tests and documentation of HTTP#head
Browse files Browse the repository at this point in the history
  • Loading branch information
ear7h committed Sep 17, 2017
1 parent a538567 commit 9d74ed6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion vm/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func builtinHTTPClassMethods() []*BuiltinMethodObject {
}
},
}, {
// Sends a HEAD request to the target with type header and body. Returns the HTTP response as a string. Will error on non-200 responses, for more control over http requests look at the `start` method.
// Sends a HEAD request to the target with type header and body. Returns the HTTP headers as a map[string]string. Will error on non-200 responses, for more control over http requests look at the `start` method.
Name: "head",
Fn: func(receiver Object) builtinMethodBody {
return func(t *thread, args []Object, blockFrame *callFrame) Object {
Expand Down
4 changes: 2 additions & 2 deletions vm/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ func TestHTTPObject(t *testing.T) {
require "net/http"
res = Net::HTTP.head("http://127.0.0.1:3000/index")
res.status
`, "OK"},
res["Content-Length"]
`, "15"},
}

//block until server is ready
Expand Down

0 comments on commit 9d74ed6

Please sign in to comment.