Javascript Indexing without HTTPS

Hi,

I’m trying to add a new record to an index using the javascript API from here:
https://www.algolia.com/doc/api-client/javascript/indexing/

However it seems that the API only supports HTTPS. Is it possible to use this API in a non HTTPS environment?

Thanks

Hi there,

Yes, the Client has the protocol option, and its possible values are http:or https:.
You can take a look here.

Let us know if it helps!

Hi,

No I still got the same HTTPS error. I’ve attached screenshots of the error I get and the current code I’m using.

Does the add object function work in browser?

Thanks

3

Does the indexing addObject function accept non HTTPS requests?

Hi @jc.yin, only search methods are HTTP compatible. For every indexing methods you need to stay HTTPS. Is this an issue to use HTTPS on your side? If so let us know why.

2 Likes