Closed KevinMayfield closed 5 years ago
Url from HAPI Client is:
https://data.developer.nhs.uk/nrls-ri/metadata?_format=xml
Headers are:
Accept-Charset = [utf-8] Authorization = [deleted] fromASID = [200000000117] Accept = [application/fhir+xml;q=1.0, application/xml+fhir;q=0.9] toASID = [999999999999] User-Agent = [HAPI-FHIR/3.5.0 (FHIR Client; FHIR 3.0.1/DSTU3; apache)] Accept-Encoding = [gzip]
Can be closed from HAPI client perspective.
The work around for hapi client is to not use the setEncoding method:
clientNRLS.setEncoding(EncodingEnum.XML);
As per above
HAPI seems to default to the older _format method of specifying content type.
This results in NRLS returning 415 error (as per https://developer.nhs.uk/apis/nrls/development_general_api_guidance.html)
Logged on HAPI forum https://groups.google.com/forum/#!topic/hapi-fhir/GvmJ_2dqyVM