I assume you are using JQuery.Ajax. Setting the Headers property in AjaxSettings seems to do the trick:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
open WebSharper.JQuery

let token = System.Guid.NewGuid().ToString()
let query =
    Async.FromContinuations <| fun (ok, ko, _) ->
        JQuery.Ajax("/foo",
            AjaxSettings(
                Headers = Object<_> [|"Authorization", token|],
                Success = fun (_) -> ok ()
            )
        )
        |> ignore

query |> Async.Start
By on 8/17/2015 2:11 AM ()

Headers = Object<_> [|"Authorization", token|] That was what I was looking for! Thanks!

By on 8/17/2015 2:21 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper