packngo
packngo copied to clipboard
Transfer requests
I started working on this and I've got a question about it.
TransferProject function is under "TransferRequestsService" I'm wondering if it would better fit under ProjectService?
@t0mk What do you think?
While testing I've found an issue here.
According to documentation POST projects/{id}/transfers
should be returning transfer request
But in reality it returns nothing and a different status code from what is documented:
2018/07/30 10:04:13
=======[REQUEST]=============
POST /projects/8a329eeb-718b-4e58-a736-127ba5f06ed0/transfers HTTP/1.1
Host: api.packet.net
User-Agent: packngo/0.1.0
Connection: close
Content-Length: 66
Accept: application/json
Content-Type: application/json
X-Auth-Token: [token]
X-Consumer-Token: packngo test
Accept-Encoding: gzip
{"target_organization_id":"acfc828a-90ee-4e0a-8216-596f43117aef"}
2018/07/30 10:04:18
=======[RESPONSE]============
HTTP/2.0 200 OK
Connection: close
Accept-Ranges: bytes
Cache-Control: no-cache
Content-Type: application/json
Date: Mon, 30 Jul 2018 08:04:18 GMT
Status: 200 OK
Vary: Origin
Via: 1.1 varnish
X-Cache: MISS
X-Cache-Hits: 0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Request-Id: d5347329-9804-4d50-826b-6a12e23181c1
X-Served-By: cache-fra19150-FRA
X-Timer: S1532937854.103850,VS0,VE4222
X-Xss-Protection: 1; mode=block
@jasmingacic , got & reported. will be back soon
As @jasmingacic noted, the POST to /projects/<id>/transfers
returns 200 OK and empty body.
I noticed there is also no transfer listed for the organization after the creating POST:
=======[REQUEST]=============
POST /projects/7cab5310-b6d8-47c2-9ebe-b9f0810fb525/transfers HTTP/1.1
{"target_organization_id":"f05675c0-c9be-4bac-bb14-73bd6386bdd2"}
=======[RESPONSE]============
HTTP/2.0 200 OK
[empty body]
=======[REQUEST]=============
GET /organizations/f05675c0-c9be-4bac-bb14-73bd6386bdd2/transfers? HTTP/1.1
=======[RESPONSE]============
{"transfers":[]}
@mberrueta are there any updates on this?
@mberrueta any update here?
@mberrueta can you please comment so we can look to close out.