Skip to content

Commit

Permalink
Merge pull request #2 from bohdanszymanik/master
Browse files Browse the repository at this point in the history
[WiP] PR to do define request for POST
  • Loading branch information
OlegZee committed Oct 28, 2015
2 parents 1706971 + 52c5cb1 commit 8b4f7d7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/HttpCli.fs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ let post (url : string) (define : DefineRequest) (data : byte []) =
request.ContentType <- "application/x-www-form-urlencoded"
request.ContentLength <- int64 data.Length

do define request

use stream = request.GetRequestStream()
stream.Write(data, 0, data.Length)
stream.Close()

do define request)
)

let get (url : string) = send url "GET"

0 comments on commit 8b4f7d7

Please sign in to comment.