You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
Hi @michael8bit, unfortunately response headers are not part of the output. The library would have to be extended in order to support response headers.
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.
Is there currently a way to access the response header? Or does the library need to be extended?
The text was updated successfully, but these errors were encountered: