Error when using Raml header element from api console


#1

Hello,

Raml files can contain headers. Like this ex.:

/{cNo}/Products:
description: This is the URL where you can get info to.
type: { errorandvalidationpost }
get:
headers:
x-test-key:
displayName: Test key
description: This header is used to send data that contains your test key
type: string
queryParameters:
productCodes:
displayName: Product codes
type: ProductCodes
description: Product codes
required: false
responses:
200:
body:
application/json:
example: !include schemas/productI.json
type: !include schemas/productI.schema.json

But when I try to set data in the header(x-test-key) from API console (https://github.com/mulesoft/api-console)
I always receive error. from the .net rest service:

The requested URL can’t be reached
The service might be temporarily down or it may have moved permanently to a new web address.
Failed to fetch

What am I doing wrong here? Or is this a bug in the api consol.
Because when I send the request from ex. PostMan with header data It works fine.

I think maybe the custom header is placed in wrong place in the request message.
I see it sends as a OPTIONS not a GET from the console when I set data in the header from the Console.
But I can’t understand why this happings, or if this is the error here.

Regards

Pål Fredrik


#2

Hi @Pal_Fredrik: I see you cross-posted your issue here: https://github.com/mulesoft/api-console/issues/562 I think this is the right place as this seems like an issue with API Console.