Open bheavner opened 6 years ago
A POST
has the same behavior, and will create a new code for an existing user:
> httr::POST("http://minid.bd2k.org/minid/user",
+ body = list(email = email(config),
+ name = user(config),
+ orcid = orcid(config)),
+ encode = "json",
+ httr::verbose())
-> POST /minid/user HTTP/1.1
-> Host: minid.bd2k.org
-> User-Agent: libcurl/7.54.0 r-curl/3.2 httr/1.3.1
-> Accept-Encoding: gzip, deflate
-> Accept: application/json, text/xml, application/xml, */*
-> Content-Type: application/json
-> Content-Length: 81
->
>> {"email":"bheavner@gmail.com","name":"Ben Heavner","orcid":"0000-0003-2898-9044"}
<- HTTP/1.1 201 CREATED
<- Date: Fri, 27 Apr 2018 16:33:22 GMT
<- Server: Apache/2.4.7 (Ubuntu)
<- Content-Length: 96
<- Content-Type: application/json
<-
Response [http://minid.bd2k.org/minid/user]
Date: 2018-04-27 16:33
Status: 201
Content-Type: application/json
Size: 96 B
{
"email": "bheavner@gmail.com",
"name": "Ben Heavner",
"orcid": "0000-0003-2898-9044"
From this, I expect a
PUT
on a user object should validate a user (and aPOST
should register a new user - https://github.com/fair-research/minid-server/blob/master/rest-api.rst . However, when I do aPUT
with an existing user, I get a201 CREATED
response and an email is sent with a new registration code:Further, the content returned does not have a code - only the email does: