Import file from HTTP action

I’m doing a HTTP POST api call to an endpoint that returns a file (in this case a JPEG) with content-type image/jpeg and binary data in the body. However when using the httpaction in the REST plugin it doesn’t return any information. I saw the “GetFileFromUrl“ action in the File extensions plugin, but I need to be able to access the body of the HTTP action since the access token will be set there.

Is there any other way to retrieve the file?

The trace log from the current attempt using the httpaction:

Running action ‘do_call_proof_document’ (HttpAction) 0.6470109 0.000110
- url = {URL} 0.6470767
- method = POST=string 0.6471405
- skip_request_body_serialization = False=boolean 0.6472046
- skip_response_body_serialization = False=boolean 0.6472683
- literal_headers = =<> 0.647334
- request_body_object = [[access_token, {token}=<<string,string>> 0.6473996
Action ‘do_call_proof_document’ (HttpAction) returned 0.6479084
- success = False=boolean 0.6479783
- error = Message( NovuloRest_http_action_exception, Novulo.Framework.Utils.TranslatedMessage ): Er is een fout opgetreden tijdens het uitvoeren van de HTTP-actie: System.ArgumentNullException: Value cannot be null.
Parameter name: contentType
at System.Net.Mime.ContentType..ctor(String contentType)
at Novulo.Plugins.Serialization.SerializationHelper.GetInstance(String contentType, Encoding encoding, Boolean removeUnderscoreFromIDs, Boolean skipEmptyNodes)
at Novulo.Plugins.Serialization.SerializationHelper.GetInstance(String contentType, Encoding encoding, Boolean removeUnderscoreFromIDs)
at Novulo.Plugins.Serialization.SerializationHelper.GetInstance(String contentType, Boolean removeUnderscoreFromIDs)
at Novulo.Plugins.Rest.Utils.HttpActionClient.PrepareRequest(HttpWebRequest request, String& bodyString, Message& error)
at Novulo.Plugins.Rest.Utils.HttpActionClient.ExecuteRequest(OperationResult& result, NObject& responseBodyNObject, Message& error)
at Novulo.Plugins.Rest.Controller.HttpAction.Execute(Dictionary`2 parameters, TaskHandler taskHandler)=messages 0.6481367 0.000158
- has_timed_out = False=boolean 0.6482251
- response_object = null=string 0.6483134
- response_object_ntype_string = null=string 0.648384
- response_status = null=int 0.6484485
- response_body = null=string 0.6485263
- request_uri = null=string 0.6485927
- request_body = null=string 0.6486581
- request_time = null=int 0.6487222
- response_status_message = null=string 0.6487859
Took: 1.3875ms 0.6488517
Finished evaluating transitions from ‘do_call_proof_document’.