mercadopago 2.2.1 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +8 -0
- data/README.md +55 -11
- data/fixtures/vcr_cassettes/cancel_preapproval.yml +65 -0
- data/fixtures/vcr_cassettes/create_preapproval.yml +68 -0
- data/fixtures/vcr_cassettes/create_preference.yml +102 -0
- data/fixtures/vcr_cassettes/get_preference.yml +97 -0
- data/fixtures/vcr_cassettes/login.yml +63 -0
- data/fixtures/vcr_cassettes/wrong_login.yml +63 -0
- data/fixtures/vcr_cassettes/wrong_token.yml +63 -0
- data/lib/mercadopago/authentication.rb +15 -8
- data/lib/mercadopago/checkout.rb +22 -8
- data/lib/mercadopago/client.rb +47 -7
- data/lib/mercadopago/request.rb +22 -3
- data/lib/mercadopago/version.rb +1 -1
- data/mercadopago.gemspec +4 -1
- data/test/test_mercado_pago.rb +176 -58
- metadata +54 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a55c93f6bde4634a5157aca1c03eb6631f517a5
|
4
|
+
data.tar.gz: 17e77d1b34cf474288ef877970d553d31c356b52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de3e3ca1f51180513beab52198fc5da695f583cee83b2a6b3240fc6afb287de0076944b5728c37ee446d1bda35fea3a10cf5f6f1597bf9d6bf39fc13e2ce647c
|
7
|
+
data.tar.gz: b7b5bd3c53b6a648d4297f93913100358b153ac4fa00555cad1047a7f968e4a86ff94495de189a56b497278e8e574de7d375530db6709ca336cea2602201918c
|
data/.gitignore
CHANGED
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,20 +1,22 @@
|
|
1
1
|
MercadoPago Gem
|
2
2
|
===============
|
3
3
|
|
4
|
-
Developed
|
4
|
+
Developed by [Kauplus](http://www.kauplus.com). Maintained by [OmbuLabs](http://www.ombulabs.com).
|
5
5
|
|
6
6
|
This is a Ruby client for all the services offered by [MercadoPago](http://www.mercadopago.com).
|
7
7
|
|
8
8
|
You should read the MercadoPago API documentation before you use this gem. This gem works with hashes and only deals with requests/responses. That's why you will need an understanding of their services.
|
9
9
|
|
10
10
|
You can read the documentation of the MercadoPago API here:
|
11
|
-
|
12
|
-
*
|
11
|
+
|
12
|
+
* Portuguese: https://www.mercadopago.com.br/developers/pt/
|
13
|
+
* Spanish: https://www.mercadopago.com.ar/developers/es/
|
14
|
+
* English: https://www.mercadopago.com/developers/
|
13
15
|
|
14
16
|
Installation
|
15
17
|
------------
|
16
18
|
|
17
|
-
mercadopago 2.
|
19
|
+
mercadopago 2.3.0 needs Ruby >= 2.0.0. For Ruby 1.9 support, use mercadopago ~> 2.2.0.
|
18
20
|
|
19
21
|
To install the last version of the gem:
|
20
22
|
|
@@ -47,7 +49,9 @@ The first thing to do is create a client. The client will authenticate with Merc
|
|
47
49
|
|
48
50
|
mp_client = MercadoPago::Client.new(client_id, client_secret)
|
49
51
|
|
50
|
-
If any error
|
52
|
+
If any error occurred while authenticating with MercadoPago, an AccessError will
|
53
|
+
be raised. If nothing goes wrong, no errors are raised and you are ready to use
|
54
|
+
the API.
|
51
55
|
|
52
56
|
### Payment Creation
|
53
57
|
|
@@ -124,7 +128,8 @@ If everything worked out alright, you will get a response like this:
|
|
124
128
|
|
125
129
|
### Payment Status Verification
|
126
130
|
|
127
|
-
To check the payment status you will need the payment ID. Only then you can call
|
131
|
+
To check the payment status you will need the payment ID. Only then you can call
|
132
|
+
the [MercadoPago IPN](https://developers.mercadopago.com/api-ipn).
|
128
133
|
|
129
134
|
# Use the payment ID received on the IPN.
|
130
135
|
payment_id = '987654321'
|
@@ -249,7 +254,7 @@ You will get a response like this one:
|
|
249
254
|
}
|
250
255
|
}
|
251
256
|
|
252
|
-
And the parameters
|
257
|
+
And the parameters that could be used in the search hash are:
|
253
258
|
|
254
259
|
id: Payment identifier
|
255
260
|
site_id: Country identifier: Argentina: MLA; Brasil: MLB.
|
@@ -258,13 +263,13 @@ And the parameters thay could be used in the search hash are:
|
|
258
263
|
last_modified: Last modified date. Ej: range=last_modified&begin_date=NOW-1DAYS&end_date=NOW (Ver ISO-8601).
|
259
264
|
money_release_date: Date of the payment's release. Ej: range=money_release_date&begin_date=NOW-1DAYS&end_date=NOW (Ver ISO-8601).
|
260
265
|
payer_id: Buyer's identifier.
|
261
|
-
reason: Description of what's being
|
266
|
+
reason: Description of what's being paid.
|
262
267
|
transaction_amount: Amount of the transaction.
|
263
268
|
currency_id: Currency type. Argentina: ARS (peso argentino); USD (Dólar estadounidense); Brasil: BRL (Real).
|
264
269
|
external_reference: Field used by the seller as aditional reference.
|
265
270
|
mercadopago_fee: MercadoPago's comission fee.
|
266
271
|
net_received_amount: Amount payable to the seller without mercadopago_fee.
|
267
|
-
total_paid_amount: Obtained by adding: transaction_amount, shipping_cost and the amount
|
272
|
+
total_paid_amount: Obtained by adding: transaction_amount, shipping_cost and the amount paid by the buyer (including credit card's financing).
|
268
273
|
shipping_cost: Shipping cost.
|
269
274
|
status:
|
270
275
|
pending: The payment process is incomplete.
|
@@ -286,8 +291,8 @@ And the parameters thay could be used in the search hash are:
|
|
286
291
|
|
287
292
|
The sandbox mode can be enabled/disabled as follows:
|
288
293
|
|
289
|
-
mp_client.
|
290
|
-
mp_client.
|
294
|
+
mp_client.sandbox_mode(true) # Enables sandbox
|
295
|
+
mp_client.sandbox_mode(false) # Disables sandbox
|
291
296
|
|
292
297
|
### Recurring Payment Creation
|
293
298
|
|
@@ -395,7 +400,38 @@ Status code: 200 OK
|
|
395
400
|
"last_modified": "2012-08-31T11:50:26.648-04:00"
|
396
401
|
}
|
397
402
|
|
403
|
+
### Recurring Payment Cancellation
|
404
|
+
|
405
|
+
To cancel a recurring payment you will need the preapproval ID.
|
406
|
+
|
407
|
+
# Use the preapproval ID received on the IPN.
|
408
|
+
preapproval_id = '987654321'
|
409
|
+
|
410
|
+
cancellation = mp_client.cancel_preapproval_payment(preapproval_id)
|
411
|
+
|
412
|
+
You will get a response like this one:
|
413
|
+
|
414
|
+
Status code: 200 OK
|
398
415
|
|
416
|
+
{
|
417
|
+
"id": "preapproval_id",
|
418
|
+
"payer_id": 12345,
|
419
|
+
"payer_email": "payeremail@email.com",
|
420
|
+
"back_url": "https://www.mysite.com/afterAuth",
|
421
|
+
"collector_id": 12345,
|
422
|
+
"application_id": 10648,
|
423
|
+
"status": "cancelled",
|
424
|
+
"reason": "reason text",
|
425
|
+
"external_reference": "OP-1234",
|
426
|
+
"date_created": "2012-08-31T11:50:26.648-04:00",
|
427
|
+
"last_modified": "2012-08-31T11:50:26.648-04:00",
|
428
|
+
"auto_recurring": {
|
429
|
+
"frequency": 1,
|
430
|
+
"frequency_type": "months",
|
431
|
+
"transaction_amount": 60,
|
432
|
+
"currency_id": "BRL"
|
433
|
+
}
|
434
|
+
}
|
399
435
|
|
400
436
|
### Errors
|
401
437
|
|
@@ -419,6 +455,14 @@ This gem has tests for a few methods. To check if it is working properly, just r
|
|
419
455
|
Changelog
|
420
456
|
---------
|
421
457
|
|
458
|
+
2.3.0 (thanks Miguelcldn, etagwerker, schmierkov and mauro-oto)
|
459
|
+
|
460
|
+
- Added ability for client to perform custom GET and POST requests.
|
461
|
+
- Added cancel recurring payments endpoint.
|
462
|
+
- Better code style + DRYer code.
|
463
|
+
- Added VCR gem for tests.
|
464
|
+
- Documentation fixes.
|
465
|
+
|
422
466
|
2.2.0 (thanks gulymaestro)
|
423
467
|
|
424
468
|
Added support to the sandbox mode.
|
@@ -0,0 +1,65 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://api.mercadopago.com/preapproval/561880ec6d97419f9b69b816d0e98674?access_token=APP_USR-<CLIENT-ID>-1234567
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"status":"cancelled"}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
Accept:
|
13
|
+
- application/json
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
User-Agent:
|
17
|
+
- Ruby
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Date:
|
24
|
+
- Mon, 25 Apr 2016 18:23:00 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json;charset=UTF-8
|
27
|
+
Transfer-Encoding:
|
28
|
+
- chunked
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
X-Mlapi-Version:
|
32
|
+
- 2.0.96
|
33
|
+
Vary:
|
34
|
+
- Accept,Accept-Encoding
|
35
|
+
Cache-Control:
|
36
|
+
- max-age=0
|
37
|
+
Etag:
|
38
|
+
- 22524093aeead50e9c75e467daa402a0
|
39
|
+
X-Content-Type-Options:
|
40
|
+
- nosniff
|
41
|
+
X-Frame-Options:
|
42
|
+
- DENY
|
43
|
+
X-Request-Id:
|
44
|
+
- ff0f5f0f-b826-4783-8e32-bfd2521597a1
|
45
|
+
X-Xss-Protection:
|
46
|
+
- 1; mode=block
|
47
|
+
Strict-Transport-Security:
|
48
|
+
- max-age=15724800
|
49
|
+
Access-Control-Allow-Origin:
|
50
|
+
- "*"
|
51
|
+
Access-Control-Allow-Headers:
|
52
|
+
- Content-Type
|
53
|
+
Access-Control-Allow-Methods:
|
54
|
+
- PUT, GET, POST, DELETE, OPTIONS
|
55
|
+
Access-Control-Max-Age:
|
56
|
+
- '86400'
|
57
|
+
X-Libra-Upstreamhost:
|
58
|
+
- 172.16.161.224
|
59
|
+
body:
|
60
|
+
encoding: UTF-8
|
61
|
+
string: '{"id":"561880ec6d97419f9b69b816d0e98674","payer_id":127044776,"payer_email":"buyer@email.com","back_url":"http://www.example.com/payment_complete","collector_id":64475662,"application_id":"<CLIENT-ID>","status":"cancelled","reason":"reason
|
62
|
+
text","external_reference":"order_id 1234","date_created":"2016-04-25T14:22:58.644-04:00","last_modified":"2016-04-25T14:22:59.920-04:00","auto_recurring":{"frequency":1,"frequency_type":"months","transaction_amount":12.99,"currency_id":"ARS"}}'
|
63
|
+
http_version:
|
64
|
+
recorded_at: Mon, 25 Apr 2016 18:23:00 GMT
|
65
|
+
recorded_with: VCR 3.0.1
|
@@ -0,0 +1,68 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.mercadopago.com/preapproval?access_token=APP_USR-<CLIENT-ID>-1234567
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"payer_email":"buyer@email.com","back_url":"http://www.example.com/payment_complete","reason":"reason
|
9
|
+
text","external_reference":"order_id 1234","auto_recurring":{"frequency":1,"frequency_type":"months","transaction_amount":12.99,"currency_id":"ARS"}}'
|
10
|
+
headers:
|
11
|
+
Content-Type:
|
12
|
+
- application/json
|
13
|
+
Accept:
|
14
|
+
- application/json
|
15
|
+
Accept-Encoding:
|
16
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
17
|
+
User-Agent:
|
18
|
+
- Ruby
|
19
|
+
response:
|
20
|
+
status:
|
21
|
+
code: 201
|
22
|
+
message: Created
|
23
|
+
headers:
|
24
|
+
Date:
|
25
|
+
- Mon, 25 Apr 2016 18:27:43 GMT
|
26
|
+
Content-Type:
|
27
|
+
- application/json;charset=UTF-8
|
28
|
+
Transfer-Encoding:
|
29
|
+
- chunked
|
30
|
+
Connection:
|
31
|
+
- keep-alive
|
32
|
+
X-Mlapi-Version:
|
33
|
+
- 2.0.96
|
34
|
+
Vary:
|
35
|
+
- Accept,Accept-Encoding
|
36
|
+
Cache-Control:
|
37
|
+
- max-age=0
|
38
|
+
Etag:
|
39
|
+
- 0bcd8a3d1287235b1af8e92dd33c5c00
|
40
|
+
X-Content-Type-Option:
|
41
|
+
- nosniff
|
42
|
+
X-Frame-Options:
|
43
|
+
- DENY
|
44
|
+
X-Request-Id:
|
45
|
+
- 574a3595-4c74-4f6d-8061-6d144a45d7cc
|
46
|
+
X-Xss-Protection:
|
47
|
+
- 1; mode=block
|
48
|
+
X-Content-Type-Options:
|
49
|
+
- nosniff
|
50
|
+
Strict-Transport-Security:
|
51
|
+
- max-age=15724800
|
52
|
+
Access-Control-Allow-Origin:
|
53
|
+
- "*"
|
54
|
+
Access-Control-Allow-Headers:
|
55
|
+
- Content-Type
|
56
|
+
Access-Control-Allow-Methods:
|
57
|
+
- PUT, GET, POST, DELETE, OPTIONS
|
58
|
+
Access-Control-Max-Age:
|
59
|
+
- '86400'
|
60
|
+
X-Libra-Upstreamhost:
|
61
|
+
- 10.32.146.134
|
62
|
+
body:
|
63
|
+
encoding: UTF-8
|
64
|
+
string: '{"id":"561880ec6d97419f9b69b816d0e98674","payer_id":127044776,"payer_email":"buyer@email.com","back_url":"http://www.example.com/payment_complete","collector_id":64475662,"application_id":"<CLIENT-ID>","status":"pending","reason":"reason
|
65
|
+
text","external_reference":"order_id 1234","date_created":"2016-04-25T14:27:43.896-04:00","last_modified":"2016-04-25T14:27:43.896-04:00","init_point":"https://www.mercadopago.com/mla/debits/new?preapproval_id=561880ec6d97419f9b69b816d0e98674","sandbox_init_point":"https://sandbox.mercadopago.com/mla/debits/new?preapproval_id=561880ec6d97419f9b69b816d0e98674","auto_recurring":{"frequency":1,"frequency_type":"months","transaction_amount":12.99,"currency_id":"ARS"}}'
|
66
|
+
http_version:
|
67
|
+
recorded_at: Mon, 25 Apr 2016 18:27:44 GMT
|
68
|
+
recorded_with: VCR 3.0.1
|
@@ -0,0 +1,102 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.mercadopago.com/checkout/preferences?access_token=APP_USR-<CLIENT-ID>-1234567
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"external_reference":"OPERATION-ID-1234","items":[{"id":"Código 123","title":"Example
|
9
|
+
T-Shirt","description":"Red XL T-Shirt","quantity":1,"unit_price":0.5,"currency_id":"BRL","picture_url":"http://s3.amazonaws.com/ombu_store_production/images/products/1375/product/l-idiot-savant-rare-device-tee.jpeg"}],"payer":{"name":"John","surname":"Mikel","email":"buyer@email.com"},"back_urls":{"pending":"https://www.site.com/pending","success":"http://www.site.com/success","failure":"http://www.site.com/failure"}}'
|
10
|
+
headers:
|
11
|
+
Content-Type:
|
12
|
+
- application/json
|
13
|
+
Accept:
|
14
|
+
- application/json
|
15
|
+
Accept-Encoding:
|
16
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
17
|
+
User-Agent:
|
18
|
+
- Ruby
|
19
|
+
response:
|
20
|
+
status:
|
21
|
+
code: 201
|
22
|
+
message: Created
|
23
|
+
headers:
|
24
|
+
Date:
|
25
|
+
- Mon, 25 Apr 2016 18:27:45 GMT
|
26
|
+
Content-Type:
|
27
|
+
- application/json;charset=UTF-8
|
28
|
+
Transfer-Encoding:
|
29
|
+
- chunked
|
30
|
+
Connection:
|
31
|
+
- keep-alive
|
32
|
+
X-Mlapi-Version:
|
33
|
+
- 2.0.96
|
34
|
+
Vary:
|
35
|
+
- Accept,Accept-Encoding
|
36
|
+
Cache-Control:
|
37
|
+
- max-age=0
|
38
|
+
Etag:
|
39
|
+
- 3028d76bae4b3939c71a9eb3db9d834f
|
40
|
+
X-Content-Type-Option:
|
41
|
+
- nosniff
|
42
|
+
X-Frame-Options:
|
43
|
+
- DENY
|
44
|
+
X-Request-Id:
|
45
|
+
- 3e10bff1-893f-4ce4-a391-8b5849ac33fb
|
46
|
+
X-Xss-Protection:
|
47
|
+
- 1; mode=block
|
48
|
+
X-Content-Type-Options:
|
49
|
+
- nosniff
|
50
|
+
Strict-Transport-Security:
|
51
|
+
- max-age=15724800
|
52
|
+
Access-Control-Allow-Origin:
|
53
|
+
- "*"
|
54
|
+
Access-Control-Allow-Headers:
|
55
|
+
- Content-Type
|
56
|
+
Access-Control-Allow-Methods:
|
57
|
+
- PUT, GET, POST, DELETE, OPTIONS
|
58
|
+
Access-Control-Max-Age:
|
59
|
+
- '86400'
|
60
|
+
X-Libra-Upstreamhost:
|
61
|
+
- 10.32.146.134
|
62
|
+
body:
|
63
|
+
encoding: ASCII-8BIT
|
64
|
+
string: !binary |-
|
65
|
+
eyJjb2xsZWN0b3JfaWQiOjY0NDc1NjYyLCJvcGVyYXRpb25fdHlwZSI6InJl
|
66
|
+
Z3VsYXJfcGF5bWVudCIsIml0ZW1zIjpbeyJpZCI6IkPDs2RpZ28gMTIzIiwi
|
67
|
+
dGl0bGUiOiJFeGFtcGxlIFQtU2hpcnQiLCJkZXNjcmlwdGlvbiI6IlJlZCBY
|
68
|
+
TCBULVNoaXJ0IiwiY2F0ZWdvcnlfaWQiOiIiLCJwaWN0dXJlX3VybCI6Imh0
|
69
|
+
dHA6Ly9zMy5hbWF6b25hd3MuY29tL29tYnVfc3RvcmVfcHJvZHVjdGlvbi9p
|
70
|
+
bWFnZXMvcHJvZHVjdHMvMTM3NS9wcm9kdWN0L2wtaWRpb3Qtc2F2YW50LXJh
|
71
|
+
cmUtZGV2aWNlLXRlZS5qcGVnIiwiY3VycmVuY3lfaWQiOiJBUlMiLCJxdWFu
|
72
|
+
dGl0eSI6MSwidW5pdF9wcmljZSI6MC41fV0sInBheWVyIjp7Im5hbWUiOiJK
|
73
|
+
b2huIiwic3VybmFtZSI6Ik1pa2VsIiwiZW1haWwiOiJidXllckBlbWFpbC5j
|
74
|
+
b20iLCJkYXRlX2NyZWF0ZWQiOiIiLCJwaG9uZSI6eyJhcmVhX2NvZGUiOiIi
|
75
|
+
LCJudW1iZXIiOiIifSwiaWRlbnRpZmljYXRpb24iOnsidHlwZSI6IiIsIm51
|
76
|
+
bWJlciI6IiJ9LCJhZGRyZXNzIjp7InN0cmVldF9uYW1lIjoiIiwic3RyZWV0
|
77
|
+
X251bWJlciI6bnVsbCwi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UMTQ6Mjc6
|
93
|
+
NDUuNzgzLTA0OjAwIiwiaWQiOiI2NDQ3NTY2Mi1kMjllNjc4NC02NmE5LTRi
|
94
|
+
YTItYjY5ZS00ZTk4NDI0NzY4ZDAiLCJpbml0X3BvaW50IjoiaHR0cHM6Ly93
|
95
|
+
d3cubWVyY2Fkb3BhZ28uY29tL21sYS9jaGVja291dC9zdGFydD9wcmVmX2lk
|
96
|
+
PTY0NDc1NjYyLWQyOWU2Nzg0LTY2YTktNGJhMi1iNjllLTRlOTg0MjQ3Njhk
|
97
|
+
MCIsInNhbmRib3hfaW5pdF9wb2ludCI6Imh0dHBzOi8vc2FuZGJveC5tZXJj
|
98
|
+
YWRvcGFnby5jb20vbWxhL2NoZWNrb3V0L3BheT9wcmVmX2lkPTY0NDc1NjYy
|
99
|
+
LWQyOWU2Nzg0LTY2YTktNGJhMi1iNjllLTRlOTg0MjQ3NjhkMCJ9
|
100
|
+
http_version:
|
101
|
+
recorded_at: Mon, 25 Apr 2016 18:27:45 GMT
|
102
|
+
recorded_with: VCR 3.0.1
|
@@ -0,0 +1,97 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.mercadopago.com/checkout/preferences/64475662-d29e6784-66a9-4ba2-b69e-4e98424768d0?access_token=APP_USR-<CLIENT-ID>-1234567
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Date:
|
22
|
+
- Mon, 25 Apr 2016 18:27:46 GMT
|
23
|
+
Content-Type:
|
24
|
+
- application/json;charset=UTF-8
|
25
|
+
Transfer-Encoding:
|
26
|
+
- chunked
|
27
|
+
Connection:
|
28
|
+
- keep-alive
|
29
|
+
X-Mlapi-Version:
|
30
|
+
- 2.0.96
|
31
|
+
Vary:
|
32
|
+
- Accept,Accept-Encoding
|
33
|
+
Cache-Control:
|
34
|
+
- max-age=0
|
35
|
+
Etag:
|
36
|
+
- 2ac43266c5c277ed0964e03d9fb96d00
|
37
|
+
X-Content-Type-Options:
|
38
|
+
- nosniff
|
39
|
+
X-Frame-Options:
|
40
|
+
- DENY
|
41
|
+
X-Request-Id:
|
42
|
+
- 12984277-e8c1-4862-a77e-0d1908bf77c2
|
43
|
+
X-Xss-Protection:
|
44
|
+
- 1; mode=block
|
45
|
+
Strict-Transport-Security:
|
46
|
+
- max-age=15724800
|
47
|
+
Access-Control-Allow-Origin:
|
48
|
+
- "*"
|
49
|
+
Access-Control-Allow-Headers:
|
50
|
+
- Content-Type
|
51
|
+
Access-Control-Allow-Methods:
|
52
|
+
- PUT, GET, POST, DELETE, OPTIONS
|
53
|
+
Access-Control-Max-Age:
|
54
|
+
- '86400'
|
55
|
+
X-Libra-Upstreamhost:
|
56
|
+
- 10.32.203.219
|
57
|
+
body:
|
58
|
+
encoding: ASCII-8BIT
|
59
|
+
string: !binary |-
|
60
|
+
eyJhZGRpdGlvbmFsX2luZm8iOiIiLCJhdXRvX3JldHVybiI6IiIsImJhY2tf
|
61
|
+
dXJscyI6eyJmYWlsdXJlIjoiaHR0cDovL3d3dy5zaXRlLmNvbS9mYWlsdXJl
|
62
|
+
IiwicGVuZGluZyI6Imh0dHBzOi8vd3d3LnNpdGUuY29tL3BlbmRpbmciLCJz
|
63
|
+
dWNjZXNzIjoiaHR0cDovL3d3dy5zaXRlLmNvbS9zdWNjZXNzIn0sImNsaWVu
|
64
|
+
dF9pZCI6Ijk2MyIsImNvbGxlY3Rvcl9pZCI6NjQ0NzU2NjIsImRhdGVfY3Jl
|
65
|
+
YXRlZCI6IjIwMTYtMDQtMjVUMTQ6Mjc6NDUu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