# HTTPS call not working in Apama using http client adapter

**URL:** https://community.cumulocity.com/t/https-call-not-working-in-apama-using-http-client-adapter/4106
**Category:** Forum
**Tags:** Streaming-Analytics-Apama
**Created:** [May 10, 2019, 10:41am UTC](https://community.cumulocity.com/t/https-call-not-working-in-apama-using-http-client-adapter/4106 "2019-05-10T10:41:44Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Abir\_Banerjee1](https://avatars.discourse-cdn.com/v4/letter/a/e95f7d/32.png) [@Abir\_Banerjee1](https://community.cumulocity.com/u/Abir_Banerjee1)
#### Post date: [May 10, 2019, 10:41am UTC](https://community.cumulocity.com/t/https-call-not-working-in-apama-using-http-client-adapter/4106/1 "2019-05-10T10:41:44Z")

</div>

Hi Team,

I am trying to invoke a HTTPS REST endpoint , hosted in Integration Server from Apama using HTTP Client adapter.  
But I am getting the below error,

2019-05-10 01:29:17.006 WARN [39004] - \<connectivity.HTTPClientGenericTransport.httpClient\> Caught exception processing a request: Malformed message (Invalid HTTP status code)  
2019-05-10 01:29:17.007 ERROR [30428] - apamax.httpserversample.HelloWorldSender [2] Received error from HTTP server: apamax.httpserversample.HTTPError(3,400,“Malformed message: Invalid HTTP status code”)

Seems like the request is not even reaching the REST endpoint in this case.

But when I am changing to HTTP , it is working fine.

2019-05-10 01:39:20.814 INFO [29252] - apamax.httpserversample.HelloWorldSender [2] Received response from HTTP server: apamax.httpserversample.HTTPResponse(1,apamax.httpserversample.HelloWorldResp({“output”:“Hello Apama. How are you doing?”}))

Below is my YAML file details for the same,

connectivityPlugins:  
HTTPClientGenericTransport:  
libraryName: connectivity-http-client  
class: HTTPClient

startChains:  
httpClient:  
- apama.eventMap  
- mapperCodec:  
apamax.httpserversample.HTTPRequest:  
towardsTransport:  
mapFrom:  
- metadata.http.path: payload.path  
- metadata.requestId: payload.id  
- metadata.http.method: payload.method  
- payload: payload.data  
defaultValue:  
- metadata.contentType: application/json  
- payload.type: apamax.httpserversample.HelloWorld  
- metadata.sag.type: HelloWorld  
apamax.httpserversample.HTTPResponse:  
towardsHost:  
mapFrom:  
- payload.body: payload  
- payload.id: metadata.requestId

```
    apamax.httpserversample.HTTPError:
      towardsHost:
        mapFrom:
          - payload.id: metadata.requestId
          - payload.code: metadata.http.statusCode
          - payload.message: metadata.http.statusReason
- classifierCodec:
    rules:
      - apamax.httpserversample.HTTPResponse:
        - metadata.http.statusCode: 200
      - apamax.httpserversample.HTTPError:
        - metadata.http.statusCode: 400
- jsonCodec:
    filterOnContentType: true
- stringCodec
- HTTPClientGenericTransport:
    host: ${HOST}
    port: ${PORT}
    authentication:
      authenticationType: "HTTP_BASIC"
      username: "Administrator"
      password: "manage"

```

My query is for HTTPS , do I need to add any extra parameters?

Regards  
Abir

---

<div class="post-metadata">

### Author: ![Kevin\_Palfreyman](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/kevin_palfreyman/32/29607_2.png) [@Kevin\_Palfreyman](https://community.cumulocity.com/u/Kevin_Palfreyman)
#### Post date: [May 10, 2019, 6:55pm UTC](https://community.cumulocity.com/t/https-call-not-working-in-apama-using-http-client-adapter/4106/2 "2019-05-10T18:55:26Z")

</div>

I think this question was asked in two places, here and stackoverflow.  
Linking the two since an answer was also provided there.

> <https://stackoverflow.com/questions/56073260/https-request-response-processing-via-apama>

---

<div class="post-metadata">

### Author: ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)
#### Post date: [April 2, 2021, 3:42pm UTC](https://community.cumulocity.com/t/https-call-not-working-in-apama-using-http-client-adapter/4106/3 "2021-04-02T15:42:45Z")

</div>


