Application/hal+json in webapi accept header

Is it posible to add the option application/hal+json in de accept header for import web api(s)? I have an api that I need to request, it doesnt work I get an 406. When I open a webrequest and enter the return repsonse as the action result I see that the API does work, but it uses the content-type application/hal+json. When I use the accept header with that value in it i get an 500 error.

The api works fine in postman.
Hope you guys can help!

The “Import from Web API” action is a simplified version of “Web request” + “Parse JSON” (or XML). If something is missing in it, you can use the “Web request” action to configure request properties with any granularity - request headers, methods, etc. The “Import from web API” action doesn’t do anything that can’t be done with “Web request” + “Parse JSON” (or XML).

This part isn’t clear. Do you receive this error in the “Web request” action when specifying Accept: application/hal+json in the request headers?

I get the error when using the web api:

The web requet gives an response when enabling the return response as the result action result:


When using return no data, fail if http error, I get no response.

The “Import from web API” action doesn’t prohibit “application/hal+json” as content type. You can add any headers to the request. If you specify “application/hal+json” in the Accept header of the request and the remote web server returns the 500 error, then the problem lies somewhere else.

If the request works in Postman, can you post a screenshot of the Postman request settings?

Also, see the API documentation and make sure you include all the necessary headers and parameters in the request.

Ofcourse, is this what you need?:

( I tried * / * also).

It looks like the remote web server requires more headers than just Accept. Try adding the other headers with black checkmarks (but not grey).

Sometimes web servers require User-Agent. Earlier versions of EasyMorph didn’t send an automatic User-Agent so it has to be provided manually. The most recent version of EasyMorph sends User-Agent automatically in each request.

Hi it works! Thanks!

1 Like