-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed untracked bug: using config_useBaseUrl as a http template won't…
… crash when printing unfinished requests
- Loading branch information
SchlenkR
authored and
SchlenkR
committed
Aug 7, 2024
1 parent
625184c
commit 20aaa45
Showing
5 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
#r "../src/FsHttp/bin/debug/net6.0/FsHttp.dll" | ||
|
||
open System.IO | ||
open System.Net.Http | ||
open System.Net.Http.Headers | ||
open FsHttp | ||
open FsHttp.Operators | ||
|
||
|
||
let httpd0 = | ||
http { | ||
config_transformHeader (fun (header: Header) -> | ||
printfn "header.target: %A" header.target | ||
printfn "header.target.address: %A" header.target.address | ||
|
||
let address = "http://aaaa:5000" </> (header.target.address |> Option.defaultValue "") | ||
{ header with target.address = Some address }) | ||
} | ||
|
||
|
||
|
||
let httpd1 = | ||
http { | ||
config_transformUrl (fun url -> "http://aaaa:5000" </> url) | ||
} | ||
|
||
let httpd2 = | ||
http { | ||
config_useBaseUrl "http://aaaa:5000" | ||
} |
This file contains 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 characters
This file contains 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 characters