Questions tagged [hapi]

HAPI (HL7 application programming interface; pronounced "happy") is an open-source, object-oriented HL7 2.x parser for Java.

HAPI (HL7 application programming interface; pronounced "happy") is an open-source, object-oriented HL7 2.x parser for Java.

HL7 is a widely-used standard for electronic data exchange in the clinical and healthcare domain.

Useful links

406 questions
0
votes
1 answer

Unable to authenticate a user using @hapi/cookie 19.x.x

I've recently upgraded my project to use hapi 19.x.x along with that I have updated the project to use @hapi/cookie as opposed to the deprecated hap-auth-cookie however after successful authentication my application constantly tries to…
0
votes
1 answer

FHIR Patch in a transaction bundle

In order to submit a PATCH operation in a FHIR transaction bundle, I see that we can use a resourceType as Binary and submit like this (quoted from https://smilecdr.com/docs/fhir_repository/updating_data.html), "resourceType": "Bundle", "type":…
0
votes
1 answer

How do I pass an uploaded Image to Jimp using Hapi 19?

We're upgrading our Front-end and have reached a rather old piece of code which allows us to upload an image file to the back-end to be used as an avatar. After some wrangling we have managed to persuade the Vue.js front-end to pass an image to the…
Dan Kelly
  • 2,634
  • 5
  • 41
  • 61
0
votes
0 answers

Error when trying to use google oAuth API with hapi/bell js

I am trying to use hapi/bell and google API oAuth but i am having this 2 errors in the console: Access to XMLHttpRequest at…
0
votes
1 answer

Redirect/remove a querystring in hapijs with a prehandler

In hapijs I need to remove a querystring from a URL if it appears using a prehandler. For example this URL: https://www.example.com/products/speakers/psb-ps1-232344/?prodSource=speaker%20line%20products Should redirect to…
0
votes
0 answers

Typescript Incompatible generic types that extend same interface

Why types of request at handler function are incompatible. I assume that Request and ApiServerRequest that extends Request are compatible, why not? const app = {} type App = typeof app const testRoute = { method: 'GET', path: '', options: { …
0
votes
1 answer

how to receive unsolicited hl7 messages using hapi simple server?

I'm trying to develop a simple hl7 server using the hapi library, based on this example: http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/SendAndReceiveAMessage.html I can send a query message to another, I get the acknowledgement on the…
souter
  • 386
  • 4
  • 17
0
votes
1 answer

Hapijs content-type has application/jwt giving 415 unsupported media type

Hi I am using hapijs version 17 for REST API development, when we are using Content-Type as application/jwt, we are getting 415 http error code Unsupported Media Type .. details below .. Could someone recommend how to set the Content-type header to…
0
votes
1 answer

What is the purpose of the post request object at the end of my patient resource generated with Synthea?

I have generated a patient with the default settings using Synthea. The first entry in the bundle generated is as follows: { "fullUrl": "urn:uuid:0100411a-6826-40d8-bfc7-baba56c9945b", "resource": { // Patient resource here }, "request":…
Ewan Brown
  • 143
  • 1
  • 9
0
votes
1 answer

Hapi Joi - validate concatenated keys

I have a request body like this one: bod = { file: '123654', extension: 'bbb', ... } I'm using hapi joi to validate it's fields: let valSchema = {}; valSchema.play = Joi.object().keys({ file: Joi.string().required().message("Invalid name.…
Eunito
  • 416
  • 5
  • 22
0
votes
0 answers

decode Base64 string in hapi

I have a need to decode some base 64 string in java script server based in Hapi library In link I found that Hapi support base64 encode/decode but I can not find any example for how to use the relevant library. Does anyone has a good example?
0
votes
2 answers

What is the type definition of file payload with multipart/form-data in hapijs?

I am using hapijs with typescript. I upload file in multipart/fom-data. I want to define the type of the req.payload.file. But unfortunately, I couldn't find any documentation to know the type. here is the result of…
Akza
  • 1,033
  • 3
  • 19
  • 37
0
votes
1 answer

Troubles deploying Nodejs API with Hapi on Azure and Repl.it

I'm using Hapi to run an API testing deployment on different platforms. First of all I tried Heroku and everything worked fine. Then I tried to run on Azure Web Apps and it failed with an error "Hello all. I'm using Hapi to run an API testing…
Rogerio LR
  • 21
  • 1
  • 5
0
votes
1 answer

How to create a valid OBX segment in java using HAPI?

I want to generate just the OBX segment in a HL7 message in this format. OBX|6|CE|59783-1^Status in immunization series^LN|**5**|||||||F where no. 5 is the Series no. problem is when ever I try to decode this line with a HL7 decoder. it results in…
0
votes
1 answer

Joi validation using joi.object

trying to learn Typescript and using Joi with Hapi to write some API code and query validation. Ran into an issue where this works: query: joi.object({ apiKey: joi.string().required() }) but this does not: query: { …
Alex
  • 2,342
  • 1
  • 18
  • 30