Open
Description
Hello, I would like to implement a post api that returns a custom header param in the header.
I have seen that the sendAsync function returns the response text and status code.
let sendAsync (method: HttpMethod) (basePath: string) (path: string) (extraHeaders: Header list) (parts: RequestPart list) : Async<int * string> =
async {
let requestPath = applyPathParts path parts
let requestPathWithQuery = applyQueryStringParameters requestPath parts
let fullPath = combineBasePath basePath requestPathWithQuery
let! response =
Http.request fullPath
|> Http.method method
|> applyJsonRequestBody parts
|> applyMultipartFormData parts
|> applyUrlEncodedFormData parts
|> Http.headers extraHeaders
|> Http.withCredentials true
|> Http.send
let status = response.statusCode
let content = response.responseText
return status, content
}
Is there currently a way to access the response header? Or does the library need to be extended?
Metadata
Metadata
Assignees
Labels
No labels