Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Primero: add generic http helpers #1087

Open
aleksa-krolls opened this issue Mar 21, 2025 · 7 comments · May be fixed by #1101
Open

Primero: add generic http helpers #1087

aleksa-krolls opened this issue Mar 21, 2025 · 7 comments · May be fixed by #1101
Assignees

Comments

@aleksa-krolls
Copy link
Member

aleksa-krolls commented Mar 21, 2025

Request

Add support for basic http helpers for these methods:

  1. GET
  2. POST
  3. PUT

Credentials

  • Login credentials: LP Primero Demo BIH
  • Test record(s): Postman collection link
  • Authentication method(s): Basic Auth

Sample Code

If you like, you can include an example of what job code using your adaptor
might look like

get('/cases' )

Resources

Primero Doc

Logo Links

Logo already present

@martalovescoffee
Copy link
Collaborator

@redietr is about to finilise specing on Monday. Ping @hunterachieng when it's done.

@martalovescoffee
Copy link
Collaborator

Please review the estimate after @redietr has finilised spec.

@redietr redietr changed the title Primero adaptor updates Primero: add generic http helpers Mar 21, 2025
@martalovescoffee
Copy link
Collaborator

to add credentials first @redietr , @hunterachieng can proceed afterwards

@redietr
Copy link

redietr commented Mar 24, 2025

@hunterachieng It is ready, you can proceed

@hunterachieng
Copy link
Contributor

@redietr Looking at the adaptor, I see we already have a few functions in the adaptors.js file. I will proceed to create the generic functions in a separate http file.

@hunterachieng
Copy link
Contributor

@aleksa-krolls Primero only allows GET, POST, PATCH, DELETE. Therefore, I will switch PUT with PATCH

@josephjclark
Copy link
Collaborator

Turns out we have problems with Primero. From #96

There is something horribly weird going on in the Primero adaptor unit tests... its pretty rough in there.

I've just spoken to Hunter and recommended that we add a clean new HTTP implementation, based on common/undici, in the http namespace. We can do this without any breaking changes.

If there's nothing super pressing, maybe next spring we can then refactor the rest of Primero and close out #96. Fix unit tests, remove callbacks, light tidy of the APIs, docs updates, the works. The aim would be stable, rather than beautiful

@hunterachieng hunterachieng linked a pull request Mar 25, 2025 that will close this issue
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: New Issues
Development

Successfully merging a pull request may close this issue.

5 participants