Is it possible to set HTTP headers via JadeHTTPConnection
Posted: Mon Nov 20, 2017 10:16 am
The following code works except I need to pass an authrorization header, is it possible to pass/set it on the connection class?
vConnection.configureFNLProxy();
vConnectionString := "/services/v0.3/companies-office/ppsr/financing-statements/CtFMqJYEfO7qsYRZDm_0MMEwn20a";
result := vConnection.getHttpPageBinary(JadeHTTPConnection.Verb_GET, "https://sandbox.api.business.govt.nz", vConnectionString, data, "application/json").ansiToString();
status := vConnection.queryStatusCode();
e.g. and example using curl
curl --request GET \
--url 'https://sandbox.api.business.govt.nz/se ... _0MMEwn20a?=&=' \
--header 'authorization: Bearer 48c23a5b3783454b1e25818efda1bb31' \
--header 'content-type: application/json' \
--data '
'
vConnection.configureFNLProxy();
vConnectionString := "/services/v0.3/companies-office/ppsr/financing-statements/CtFMqJYEfO7qsYRZDm_0MMEwn20a";
result := vConnection.getHttpPageBinary(JadeHTTPConnection.Verb_GET, "https://sandbox.api.business.govt.nz", vConnectionString, data, "application/json").ansiToString();
status := vConnection.queryStatusCode();
e.g. and example using curl
curl --request GET \
--url 'https://sandbox.api.business.govt.nz/se ... _0MMEwn20a?=&=' \
--header 'authorization: Bearer 48c23a5b3783454b1e25818efda1bb31' \
--header 'content-type: application/json' \
--data '
'