As of version 1.1.1 the library sends application/json-rpc
as the request body MIME type, but it seems some/most servers still want application/json
. Here is a typical request and response:
(Request {requestPath = (BaseUrl {baseUrlScheme = Http, baseUrlHost = "216.158.66.219", baseUrlPort = 8899, baseUrlPath = ""},""), requestQueryString = fromList [], requestBody = Just ((),application/json-rpc), requestAccept = fromList [application/json-rpc,application/json], requestHeaders = fromList [], requestHttpVersion = HTTP/1.1, requestMethod = "POST"}) (Response {responseStatusCode = Status {statusCode = 415, statusMessage = "Unsupported Media Type"}, responseHeaders = fromList [("Server","nginx"),("Date","Sat, 29 Oct 2022 05:44:10 GMT"),("Content-Type","text/plain; charset=utf-8"),("Content-Length","81"),("Connection","keep-alive")], responseHttpVersion = HTTP/1.1, responseBody = "Supplied content type is not allowed. Content-Type: application/json is required\n"}