Skip to content

list_entities error #2

@dherykw

Description

@dherykw

Hello @chicco785

I am giving a try to this tool :-)

I have tried to list some entities but orion is complain about some headers. This is the code that I tried:

api_client = ApiClient(host='http://192.168.1.122:1026')
api_client.set_default_header('fiware-service', 'parking')
api_client.set_default_header('fiware-servicepath', '/parking')
api_instance = swagger_client.EntitiesApi(api_client)

 r = api_instance.list_entities()

print(r)

Orion returns the following response:

HTTP response headers: HTTPHeaderDict({'Connection': 'Keep-Alive', 'Content-Length': '163', 'Content-Type': 'application/json', 'Fiware-Correlator': 'c6e49922-dec4-11e9-bbd2-02420a000b0d', 'Date': 'Tue, 24 Sep 2019 12:13:54 GMT'})
HTTP response body: {"orionError":{"code":"400","reasonPhrase":"Bad Request","details":"Orion accepts no payload for GET/DELETE requests. HTTP header Content-Type is thus forbidden"}}

Orion does not allow the Content-Type It could just ignore the content if it would be present but... :S

It seems that it can be fixed just redefining the swagger but I can't find it.

Best

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions