@Private
@JavaName readEntity
readEntity_ :: Response -> Class a -> <Proc, Exception> a
+ @JavaName getHeaderString
+ possibleHeaderOf :: Response -> String -> <Proc> Maybe String
readEntity :: VecComp a => Response -> <Proc, Exception> a
readEntity response = readEntity_ response classObject
clientBuilder :: <Proc> ClientBuilder
importJava "org.simantics.scl.rest.HttpClientUtils" where
- buildClient :: ClientBuilder -> Client
+ buildClient :: ClientBuilder -> <Proc> Client
statusMessageOf :: Response -> <Proc> String
asyncInvoke :: Invocation -> ResponseHandler -> FailureHandler -> <Proc> Future Response
trustAllClientBuilder :: <Proc> ClientBuilder
+ onReadProgress :: WebTarget -> (Long -> <Proc> ()) -> <Proc> ()
+ onWriteProgress :: WebTarget -> (Long -> <Proc> ()) -> <Proc> ()
+ possibleContentLengthOf :: Response -> <Proc> Maybe Long
importJava "javax.ws.rs.client.Entity" where
data Entity
webTarget = target httpClient uri
builder = request webTarget
acceptMediaType builder [WILDCARD_TYPE]
- mp = formDataMultiPart
invocation = buildPost builder $ entity f APPLICATION_OCTET_STREAM_TYPE
response = syncInvoke invocation
print $ statusCodeOf response