Hi Matheus,
You can use the curl command or api triggers like Postman, soapui to have the values included in your call.
However, there is an extension available for chrome which lets you modify the header values for predefined endpoint. Name of extension "Modify Header Value (HTTP Headers)"
PFB the result for reference:
Without Header:
------------------------------
Regards,
Vaibhav Jain
Capgemini
------------------------------
Original Message:
Sent: 07-09-2020 08:53 AM
From: Matheus Souza
Subject: Error accessing Request URL through browser
Hi Vaibhav, thanks for your reply.
How can I pass this header?
The browser request I'm making takes the form:
http: // <address>: <port> / lisa-virtualize-invoke / api / v2 / vses / <vseId> / services / <serviceId>
Original Message:
Sent: 07-09-2020 02:30 AM
From: Vaibhav Jain
Subject: Error accessing Request URL through browser
Hi Matheus,
Make sure you are passing a header "Accept" with one of the supported values i.e. application/json.
When we test in tools like postman etc, by default it gets set to "*/*" which gives this error.
Thanks
------------------------------
Regards,
Vaibhav Jain
Capgemini
Original Message:
Sent: 07-08-2020 03:50 PM
From: Matheus Souza
Subject: Error accessing Request URL through browser
Hello everyone
I am have a problem.
I am using the invoke api to access information about a service. Through the invoke api swagger I can receive the information using the method:
GET / vses / {vseId} / services / {serviceId} / specifics
This method also gives me a Request URL to access this information. However, when trying to access this URL through the browser I have the following error:
{
"error": "Unsupported accept header: text / html, application / xhtml + xml, application / xml; q = 0.9, image / webp, image / apng, * / *; q = 0.8, application / signed-exchange; v = b3; q = 0.9 valid media types are application / json, application / zip "
}
What could be happening?
Thank you all.
------------------------------
Matheus Souza
Capgemini-BR
------------------------------