forked from datasharingframework/dsf-process-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
19 lines (14 loc) · 766 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
HOST=https://dic/fhir/
CERT=./test-data-generator/cert/dic-client/dic-client_certificate.pem
PK=./test-data-generator/cert/dic-client/dic-client_private-key.pem
CERT_PW=password
HEADER_JSON=application/fhir+json;q=1.0
HEADER_XML=application/fhir+xml;charset=utf-8
FILE?=TODO_DEFINE_FILE_VAR:(make%post_t%FILE=<FILE>)
ID?=TODO_DEFINE_ID:(make%put_t%ID=<ID>)
get_t:
curl --cert $(CERT):$(CERT_PW) --key $(PK) -H "Accept: $(HEADER_JSON)" $(HOST)Task?_pretty=true --insecure
post_t:
curl -X POST --cert $(CERT):$(CERT_PW) --key $(PK) -H "Content-Type: $(HEADER_XML)" -d @$(FILE) $(HOST)Task?_pretty=true --insecure
put_t:
curl -X PUT --cert $(CERT):$(CERT_PW) --key $(PK) -H "Content-Type: $(HEADER_XML)" -d @$(FILE) $(HOST)Task/$(ID)?_pretty=true --insecure