odata4 0.8.2 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +112 -54
- data/lib/odata4.rb +2 -1
- data/lib/odata4/service.rb +31 -29
- data/lib/odata4/service/request.rb +26 -22
- data/lib/odata4/service/response.rb +31 -22
- data/lib/odata4/version.rb +1 -1
- data/odata4.gemspec +1 -1
- data/spec/fixtures/vcr_cassettes/entity_set_specs.yml +287 -0
- data/spec/fixtures/vcr_cassettes/query_specs.yml +397 -0
- data/spec/fixtures/vcr_cassettes/usage_example_specs.yml +582 -1
- data/spec/odata4/entity_container_spec.rb +1 -1
- data/spec/odata4/entity_set_spec.rb +1 -1
- data/spec/odata4/entity_spec.rb +1 -1
- data/spec/odata4/navigation_property/proxy_spec.rb +1 -1
- data/spec/odata4/property_spec.rb +1 -1
- data/spec/odata4/query_spec.rb +1 -1
- data/spec/odata4/schema/complex_type_spec.rb +1 -1
- data/spec/odata4/schema/enum_type_spec.rb +1 -1
- data/spec/odata4/schema_spec.rb +1 -1
- data/spec/odata4/service/request_spec.rb +1 -1
- data/spec/odata4/service/response_spec.rb +3 -3
- data/spec/odata4/service_registry_spec.rb +1 -1
- data/spec/odata4/service_spec.rb +66 -5
- data/spec/odata4/usage_example_spec.rb +13 -1
- data/spec/support/vcr.rb +1 -1
- metadata +5 -5
data/lib/odata4/version.rb
CHANGED
data/odata4.gemspec
CHANGED
@@ -29,6 +29,6 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.add_development_dependency 'equivalent-xml', '~> 0.6'
|
30
30
|
|
31
31
|
spec.add_dependency 'nokogiri', '~> 1.8'
|
32
|
-
spec.add_dependency '
|
32
|
+
spec.add_dependency 'faraday', '~> 0.15'
|
33
33
|
spec.add_dependency 'andand', '~> 1.3'
|
34
34
|
end
|
@@ -1345,4 +1345,291 @@ http_interactions:
|
|
1345
1345
|
adapter_metadata:
|
1346
1346
|
effective_url: http://services.odata.org/V4/OData/OData.svc/Products(1)?$expand=Categories
|
1347
1347
|
recorded_at: Sat, 27 Jan 2018 00:23:53 GMT
|
1348
|
+
- request:
|
1349
|
+
method: get
|
1350
|
+
uri: http://services.odata.org/V4/OData/OData.svc/Products(1)?%24expand=Categories%2CSupplier
|
1351
|
+
body:
|
1352
|
+
encoding: US-ASCII
|
1353
|
+
string: ''
|
1354
|
+
headers:
|
1355
|
+
User-Agent:
|
1356
|
+
- Faraday v0.15.0
|
1357
|
+
Accept:
|
1358
|
+
- application/atom+xml,application/json,application/xml,text/plain
|
1359
|
+
Content-Type:
|
1360
|
+
- application/atom+xml,application/json,application/xml,text/plain
|
1361
|
+
OData-Version:
|
1362
|
+
- '4.0'
|
1363
|
+
response:
|
1364
|
+
status:
|
1365
|
+
code: 200
|
1366
|
+
message: OK
|
1367
|
+
headers:
|
1368
|
+
cache-control:
|
1369
|
+
- no-cache
|
1370
|
+
content-length:
|
1371
|
+
- '559'
|
1372
|
+
content-type:
|
1373
|
+
- application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
|
1374
|
+
vary:
|
1375
|
+
- Accept-Encoding
|
1376
|
+
server:
|
1377
|
+
- Microsoft-IIS/10.0
|
1378
|
+
x-content-type-options:
|
1379
|
+
- nosniff
|
1380
|
+
odata-version:
|
1381
|
+
- 4.0;
|
1382
|
+
x-aspnet-version:
|
1383
|
+
- 4.0.30319
|
1384
|
+
x-powered-by:
|
1385
|
+
- ASP.NET
|
1386
|
+
access-control-allow-origin:
|
1387
|
+
- "*"
|
1388
|
+
access-control-allow-methods:
|
1389
|
+
- GET
|
1390
|
+
access-control-allow-headers:
|
1391
|
+
- Accept, Origin, Content-Type, MaxDataServiceVersion
|
1392
|
+
access-control-expose-headers:
|
1393
|
+
- DataServiceVersion
|
1394
|
+
date:
|
1395
|
+
- Tue, 24 Apr 2018 01:58:48 GMT
|
1396
|
+
connection:
|
1397
|
+
- close
|
1398
|
+
body:
|
1399
|
+
encoding: ASCII-8BIT
|
1400
|
+
string: '{"@odata.context":"http://services.odata.org/V4/OData/OData.svc/$metadata#Products/$entity","ID":1,"Name":"Milk","Description":"Low
|
1401
|
+
fat milk","ReleaseDate":"1995-10-01T00:00:00Z","DiscontinuedDate":null,"Rating":3,"Price":3.5,"Categories":[{"ID":0,"Name":"Food"},{"ID":1,"Name":"Beverages"}],"Supplier":{"ID":0,"Name":"Exotic
|
1402
|
+
Liquids","Address":{"Street":"NE 228th","City":"Sammamish","State":"WA","ZipCode":"98074","Country":"USA"},"Location":{"type":"Point","coordinates":[-122.03547668457,47.6316604614258],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"Concurrency":0}}'
|
1403
|
+
http_version:
|
1404
|
+
recorded_at: Tue, 24 Apr 2018 01:58:49 GMT
|
1405
|
+
- request:
|
1406
|
+
method: get
|
1407
|
+
uri: http://services.odata.org/V4/OData/OData.svc/Products(1)?%24expand=Categories%2CSupplier%2CProductDetail
|
1408
|
+
body:
|
1409
|
+
encoding: US-ASCII
|
1410
|
+
string: ''
|
1411
|
+
headers:
|
1412
|
+
User-Agent:
|
1413
|
+
- Faraday v0.15.0
|
1414
|
+
Accept:
|
1415
|
+
- application/atom+xml,application/json,application/xml,text/plain
|
1416
|
+
Content-Type:
|
1417
|
+
- application/atom+xml,application/json,application/xml,text/plain
|
1418
|
+
OData-Version:
|
1419
|
+
- '4.0'
|
1420
|
+
response:
|
1421
|
+
status:
|
1422
|
+
code: 200
|
1423
|
+
message: OK
|
1424
|
+
headers:
|
1425
|
+
cache-control:
|
1426
|
+
- no-cache
|
1427
|
+
content-length:
|
1428
|
+
- '589'
|
1429
|
+
content-type:
|
1430
|
+
- application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
|
1431
|
+
vary:
|
1432
|
+
- Accept-Encoding
|
1433
|
+
server:
|
1434
|
+
- Microsoft-IIS/10.0
|
1435
|
+
x-content-type-options:
|
1436
|
+
- nosniff
|
1437
|
+
odata-version:
|
1438
|
+
- 4.0;
|
1439
|
+
x-aspnet-version:
|
1440
|
+
- 4.0.30319
|
1441
|
+
x-powered-by:
|
1442
|
+
- ASP.NET
|
1443
|
+
access-control-allow-origin:
|
1444
|
+
- "*"
|
1445
|
+
access-control-allow-methods:
|
1446
|
+
- GET
|
1447
|
+
access-control-allow-headers:
|
1448
|
+
- Accept, Origin, Content-Type, MaxDataServiceVersion
|
1449
|
+
access-control-expose-headers:
|
1450
|
+
- DataServiceVersion
|
1451
|
+
date:
|
1452
|
+
- Tue, 24 Apr 2018 01:58:49 GMT
|
1453
|
+
connection:
|
1454
|
+
- close
|
1455
|
+
body:
|
1456
|
+
encoding: ASCII-8BIT
|
1457
|
+
string: '{"@odata.context":"http://services.odata.org/V4/OData/OData.svc/$metadata#Products/$entity","ID":1,"Name":"Milk","Description":"Low
|
1458
|
+
fat milk","ReleaseDate":"1995-10-01T00:00:00Z","DiscontinuedDate":null,"Rating":3,"Price":3.5,"Categories":[{"ID":0,"Name":"Food"},{"ID":1,"Name":"Beverages"}],"Supplier":{"ID":0,"Name":"Exotic
|
1459
|
+
Liquids","Address":{"Street":"NE 228th","City":"Sammamish","State":"WA","ZipCode":"98074","Country":"USA"},"Location":{"type":"Point","coordinates":[-122.03547668457,47.6316604614258],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"Concurrency":0},"ProductDetail":{"ProductID":1,"Details":"Details
|
1460
|
+
of product 1"}}'
|
1461
|
+
http_version:
|
1462
|
+
recorded_at: Tue, 24 Apr 2018 01:58:49 GMT
|
1463
|
+
- request:
|
1464
|
+
method: get
|
1465
|
+
uri: http://services.odata.org/V4/OData/OData.svc/Products(1)?%24expand=Categories
|
1466
|
+
body:
|
1467
|
+
encoding: US-ASCII
|
1468
|
+
string: ''
|
1469
|
+
headers:
|
1470
|
+
User-Agent:
|
1471
|
+
- Faraday v0.15.0
|
1472
|
+
Accept:
|
1473
|
+
- application/atom+xml,application/json,application/xml,text/plain
|
1474
|
+
Content-Type:
|
1475
|
+
- application/atom+xml,application/json,application/xml,text/plain
|
1476
|
+
OData-Version:
|
1477
|
+
- '4.0'
|
1478
|
+
response:
|
1479
|
+
status:
|
1480
|
+
code: 200
|
1481
|
+
message: OK
|
1482
|
+
headers:
|
1483
|
+
cache-control:
|
1484
|
+
- no-cache
|
1485
|
+
content-length:
|
1486
|
+
- '339'
|
1487
|
+
content-type:
|
1488
|
+
- application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
|
1489
|
+
vary:
|
1490
|
+
- Accept-Encoding
|
1491
|
+
server:
|
1492
|
+
- Microsoft-IIS/10.0
|
1493
|
+
x-content-type-options:
|
1494
|
+
- nosniff
|
1495
|
+
odata-version:
|
1496
|
+
- 4.0;
|
1497
|
+
x-aspnet-version:
|
1498
|
+
- 4.0.30319
|
1499
|
+
x-powered-by:
|
1500
|
+
- ASP.NET
|
1501
|
+
access-control-allow-origin:
|
1502
|
+
- "*"
|
1503
|
+
access-control-allow-methods:
|
1504
|
+
- GET
|
1505
|
+
access-control-allow-headers:
|
1506
|
+
- Accept, Origin, Content-Type, MaxDataServiceVersion
|
1507
|
+
access-control-expose-headers:
|
1508
|
+
- DataServiceVersion
|
1509
|
+
date:
|
1510
|
+
- Tue, 24 Apr 2018 01:58:49 GMT
|
1511
|
+
connection:
|
1512
|
+
- close
|
1513
|
+
body:
|
1514
|
+
encoding: ASCII-8BIT
|
1515
|
+
string: '{"@odata.context":"http://services.odata.org/V4/OData/OData.svc/$metadata#Products/$entity","ID":1,"Name":"Milk","Description":"Low
|
1516
|
+
fat milk","ReleaseDate":"1995-10-01T00:00:00Z","DiscontinuedDate":null,"Rating":3,"Price":3.5,"Categories":[{"ID":0,"Name":"Food"},{"ID":1,"Name":"Beverages"}]}'
|
1517
|
+
http_version:
|
1518
|
+
recorded_at: Tue, 24 Apr 2018 01:58:49 GMT
|
1519
|
+
- request:
|
1520
|
+
method: get
|
1521
|
+
uri: http://services.odata.org/V4/OData/OData.svc/Products?%24top=1
|
1522
|
+
body:
|
1523
|
+
encoding: US-ASCII
|
1524
|
+
string: ''
|
1525
|
+
headers:
|
1526
|
+
User-Agent:
|
1527
|
+
- Faraday v0.15.0
|
1528
|
+
Accept:
|
1529
|
+
- application/atom+xml,application/json,application/xml,text/plain
|
1530
|
+
Content-Type:
|
1531
|
+
- application/atom+xml,application/json,application/xml,text/plain
|
1532
|
+
OData-Version:
|
1533
|
+
- '4.0'
|
1534
|
+
response:
|
1535
|
+
status:
|
1536
|
+
code: 200
|
1537
|
+
message: OK
|
1538
|
+
headers:
|
1539
|
+
cache-control:
|
1540
|
+
- no-cache
|
1541
|
+
content-length:
|
1542
|
+
- '308'
|
1543
|
+
content-type:
|
1544
|
+
- application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
|
1545
|
+
vary:
|
1546
|
+
- Accept-Encoding
|
1547
|
+
server:
|
1548
|
+
- Microsoft-IIS/10.0
|
1549
|
+
x-content-type-options:
|
1550
|
+
- nosniff
|
1551
|
+
odata-version:
|
1552
|
+
- 4.0;
|
1553
|
+
x-aspnet-version:
|
1554
|
+
- 4.0.30319
|
1555
|
+
x-powered-by:
|
1556
|
+
- ASP.NET
|
1557
|
+
access-control-allow-origin:
|
1558
|
+
- "*"
|
1559
|
+
access-control-allow-methods:
|
1560
|
+
- GET
|
1561
|
+
access-control-allow-headers:
|
1562
|
+
- Accept, Origin, Content-Type, MaxDataServiceVersion
|
1563
|
+
access-control-expose-headers:
|
1564
|
+
- DataServiceVersion
|
1565
|
+
date:
|
1566
|
+
- Tue, 24 Apr 2018 01:58:49 GMT
|
1567
|
+
connection:
|
1568
|
+
- close
|
1569
|
+
body:
|
1570
|
+
encoding: ASCII-8BIT
|
1571
|
+
string: '{"@odata.context":"http://services.odata.org/V4/OData/OData.svc/$metadata#Products","value":[{"ID":0,"Name":"Bread","Description":"Whole
|
1572
|
+
grain bread","ReleaseDate":"1992-01-01T00:00:00Z","DiscontinuedDate":null,"Rating":4,"Price":2.5}]}'
|
1573
|
+
http_version:
|
1574
|
+
recorded_at: Tue, 24 Apr 2018 01:58:50 GMT
|
1575
|
+
- request:
|
1576
|
+
method: get
|
1577
|
+
uri: http://services.odata.org/V4/OData/OData.svc/Products?%24top=5
|
1578
|
+
body:
|
1579
|
+
encoding: US-ASCII
|
1580
|
+
string: ''
|
1581
|
+
headers:
|
1582
|
+
User-Agent:
|
1583
|
+
- Faraday v0.15.0
|
1584
|
+
Accept:
|
1585
|
+
- application/atom+xml,application/json,application/xml,text/plain
|
1586
|
+
Content-Type:
|
1587
|
+
- application/atom+xml,application/json,application/xml,text/plain
|
1588
|
+
OData-Version:
|
1589
|
+
- '4.0'
|
1590
|
+
response:
|
1591
|
+
status:
|
1592
|
+
code: 200
|
1593
|
+
message: OK
|
1594
|
+
headers:
|
1595
|
+
cache-control:
|
1596
|
+
- no-cache
|
1597
|
+
content-length:
|
1598
|
+
- '523'
|
1599
|
+
content-type:
|
1600
|
+
- application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
|
1601
|
+
vary:
|
1602
|
+
- Accept-Encoding
|
1603
|
+
server:
|
1604
|
+
- Microsoft-IIS/10.0
|
1605
|
+
x-content-type-options:
|
1606
|
+
- nosniff
|
1607
|
+
odata-version:
|
1608
|
+
- 4.0;
|
1609
|
+
x-aspnet-version:
|
1610
|
+
- 4.0.30319
|
1611
|
+
x-powered-by:
|
1612
|
+
- ASP.NET
|
1613
|
+
access-control-allow-origin:
|
1614
|
+
- "*"
|
1615
|
+
access-control-allow-methods:
|
1616
|
+
- GET
|
1617
|
+
access-control-allow-headers:
|
1618
|
+
- Accept, Origin, Content-Type, MaxDataServiceVersion
|
1619
|
+
access-control-expose-headers:
|
1620
|
+
- DataServiceVersion
|
1621
|
+
date:
|
1622
|
+
- Tue, 24 Apr 2018 01:58:50 GMT
|
1623
|
+
connection:
|
1624
|
+
- close
|
1625
|
+
body:
|
1626
|
+
encoding: ASCII-8BIT
|
1627
|
+
string: '{"@odata.context":"http://services.odata.org/V4/OData/OData.svc/$metadata#Products","value":[{"ID":0,"Name":"Bread","Description":"Whole
|
1628
|
+
grain bread","ReleaseDate":"1992-01-01T00:00:00Z","DiscontinuedDate":null,"Rating":4,"Price":2.5},{"ID":1,"Name":"Milk","Description":"Low
|
1629
|
+
fat milk","ReleaseDate":"1995-10-01T00:00:00Z","DiscontinuedDate":null,"Rating":3,"Price":3.5},{"ID":2,"Name":"Vint
|
1630
|
+
soda","Description":"Americana Variety - Mix of 6 flavors","ReleaseDate":"2000-10-01T00:00:00Z","DiscontinuedDate":null,"Rating":3,"Price":20.9},{"ID":3,"Name":"Havina
|
1631
|
+
Cola","Description":"The Original Key Lime Cola","ReleaseDate":"2005-10-01T00:00:00Z","DiscontinuedDate":"2006-10-01T00:00:00Z","Rating":3,"Price":19.9},{"ID":4,"Name":"Fruit
|
1632
|
+
Punch","Description":"Mango flavor, 8.3 Ounce Cans (Pack of 24)","ReleaseDate":"2003-01-05T00:00:00Z","DiscontinuedDate":null,"Rating":3,"Price":22.99}]}'
|
1633
|
+
http_version:
|
1634
|
+
recorded_at: Tue, 24 Apr 2018 01:58:50 GMT
|
1348
1635
|
recorded_with: VCR 4.0.0
|
@@ -660,4 +660,401 @@ http_interactions:
|
|
660
660
|
adapter_metadata:
|
661
661
|
effective_url: http://services.odata.org/V4/OData/OData.svc/Products(0)?$expand=Categories
|
662
662
|
recorded_at: Fri, 26 Jan 2018 21:54:45 GMT
|
663
|
+
- request:
|
664
|
+
method: get
|
665
|
+
uri: http://services.odata.org/V4/OData/OData.svc/Products?%24top=5
|
666
|
+
body:
|
667
|
+
encoding: US-ASCII
|
668
|
+
string: ''
|
669
|
+
headers:
|
670
|
+
User-Agent:
|
671
|
+
- Faraday v0.15.0
|
672
|
+
Accept:
|
673
|
+
- application/atom+xml,application/json,application/xml,text/plain
|
674
|
+
Content-Type:
|
675
|
+
- application/atom+xml,application/json,application/xml,text/plain
|
676
|
+
OData-Version:
|
677
|
+
- '4.0'
|
678
|
+
response:
|
679
|
+
status:
|
680
|
+
code: 200
|
681
|
+
message: OK
|
682
|
+
headers:
|
683
|
+
cache-control:
|
684
|
+
- no-cache
|
685
|
+
content-length:
|
686
|
+
- '523'
|
687
|
+
content-type:
|
688
|
+
- application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
|
689
|
+
vary:
|
690
|
+
- Accept-Encoding
|
691
|
+
server:
|
692
|
+
- Microsoft-IIS/10.0
|
693
|
+
x-content-type-options:
|
694
|
+
- nosniff
|
695
|
+
odata-version:
|
696
|
+
- 4.0;
|
697
|
+
x-aspnet-version:
|
698
|
+
- 4.0.30319
|
699
|
+
x-powered-by:
|
700
|
+
- ASP.NET
|
701
|
+
access-control-allow-origin:
|
702
|
+
- "*"
|
703
|
+
access-control-allow-methods:
|
704
|
+
- GET
|
705
|
+
access-control-allow-headers:
|
706
|
+
- Accept, Origin, Content-Type, MaxDataServiceVersion
|
707
|
+
access-control-expose-headers:
|
708
|
+
- DataServiceVersion
|
709
|
+
date:
|
710
|
+
- Tue, 24 Apr 2018 01:58:53 GMT
|
711
|
+
connection:
|
712
|
+
- close
|
713
|
+
body:
|
714
|
+
encoding: ASCII-8BIT
|
715
|
+
string: '{"@odata.context":"http://services.odata.org/V4/OData/OData.svc/$metadata#Products","value":[{"ID":0,"Name":"Bread","Description":"Whole
|
716
|
+
grain bread","ReleaseDate":"1992-01-01T00:00:00Z","DiscontinuedDate":null,"Rating":4,"Price":2.5},{"ID":1,"Name":"Milk","Description":"Low
|
717
|
+
fat milk","ReleaseDate":"1995-10-01T00:00:00Z","DiscontinuedDate":null,"Rating":3,"Price":3.5},{"ID":2,"Name":"Vint
|
718
|
+
soda","Description":"Americana Variety - Mix of 6 flavors","ReleaseDate":"2000-10-01T00:00:00Z","DiscontinuedDate":null,"Rating":3,"Price":20.9},{"ID":3,"Name":"Havina
|
719
|
+
Cola","Description":"The Original Key Lime Cola","ReleaseDate":"2005-10-01T00:00:00Z","DiscontinuedDate":"2006-10-01T00:00:00Z","Rating":3,"Price":19.9},{"ID":4,"Name":"Fruit
|
720
|
+
Punch","Description":"Mango flavor, 8.3 Ounce Cans (Pack of 24)","ReleaseDate":"2003-01-05T00:00:00Z","DiscontinuedDate":null,"Rating":3,"Price":22.99}]}'
|
721
|
+
http_version:
|
722
|
+
recorded_at: Tue, 24 Apr 2018 01:58:53 GMT
|
723
|
+
- request:
|
724
|
+
method: get
|
725
|
+
uri: http://services.odata.org/V4/OData/OData.svc/Products?%24skip=5&%24top=5
|
726
|
+
body:
|
727
|
+
encoding: US-ASCII
|
728
|
+
string: ''
|
729
|
+
headers:
|
730
|
+
User-Agent:
|
731
|
+
- Faraday v0.15.0
|
732
|
+
Accept:
|
733
|
+
- application/atom+xml,application/json,application/xml,text/plain
|
734
|
+
Content-Type:
|
735
|
+
- application/atom+xml,application/json,application/xml,text/plain
|
736
|
+
OData-Version:
|
737
|
+
- '4.0'
|
738
|
+
response:
|
739
|
+
status:
|
740
|
+
code: 200
|
741
|
+
message: OK
|
742
|
+
headers:
|
743
|
+
cache-control:
|
744
|
+
- no-cache
|
745
|
+
content-length:
|
746
|
+
- '578'
|
747
|
+
content-type:
|
748
|
+
- application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
|
749
|
+
vary:
|
750
|
+
- Accept-Encoding
|
751
|
+
server:
|
752
|
+
- Microsoft-IIS/10.0
|
753
|
+
x-content-type-options:
|
754
|
+
- nosniff
|
755
|
+
odata-version:
|
756
|
+
- 4.0;
|
757
|
+
x-aspnet-version:
|
758
|
+
- 4.0.30319
|
759
|
+
x-powered-by:
|
760
|
+
- ASP.NET
|
761
|
+
access-control-allow-origin:
|
762
|
+
- "*"
|
763
|
+
access-control-allow-methods:
|
764
|
+
- GET
|
765
|
+
access-control-allow-headers:
|
766
|
+
- Accept, Origin, Content-Type, MaxDataServiceVersion
|
767
|
+
access-control-expose-headers:
|
768
|
+
- DataServiceVersion
|
769
|
+
date:
|
770
|
+
- Tue, 24 Apr 2018 01:58:53 GMT
|
771
|
+
connection:
|
772
|
+
- close
|
773
|
+
body:
|
774
|
+
encoding: ASCII-8BIT
|
775
|
+
string: '{"@odata.context":"http://services.odata.org/V4/OData/OData.svc/$metadata#Products","value":[{"ID":5,"Name":"Cranberry
|
776
|
+
Juice","Description":"16-Ounce Plastic Bottles (Pack of 12)","ReleaseDate":"2006-08-04T00:00:00Z","DiscontinuedDate":null,"Rating":3,"Price":22.8},{"ID":6,"Name":"Pink
|
777
|
+
Lemonade","Description":"36 Ounce Cans (Pack of 3)","ReleaseDate":"2006-11-05T00:00:00Z","DiscontinuedDate":null,"Rating":3,"Price":18.8},{"ID":7,"Name":"DVD
|
778
|
+
Player","Description":"1080P Upconversion DVD Player","ReleaseDate":"2006-11-15T00:00:00Z","DiscontinuedDate":null,"Rating":5,"Price":35.88},{"ID":8,"Name":"LCD
|
779
|
+
HDTV","Description":"42 inch 1080p LCD with Built-in Blu-ray Disc Player","ReleaseDate":"2008-05-08T00:00:00Z","DiscontinuedDate":null,"Rating":3,"Price":1088.8},{"@odata.type":"#ODataDemo.FeaturedProduct","ID":9,"Name":"Lemonade","Description":"Classic,
|
780
|
+
refreshing lemonade (Single bottle)","ReleaseDate":"1970-01-01T00:00:00Z","DiscontinuedDate":null,"Rating":7,"Price":1.01}]}'
|
781
|
+
http_version:
|
782
|
+
recorded_at: Tue, 24 Apr 2018 01:58:53 GMT
|
783
|
+
- request:
|
784
|
+
method: get
|
785
|
+
uri: http://services.odata.org/V4/OData/OData.svc/Products?%24skip=10&%24top=5
|
786
|
+
body:
|
787
|
+
encoding: US-ASCII
|
788
|
+
string: ''
|
789
|
+
headers:
|
790
|
+
User-Agent:
|
791
|
+
- Faraday v0.15.0
|
792
|
+
Accept:
|
793
|
+
- application/atom+xml,application/json,application/xml,text/plain
|
794
|
+
Content-Type:
|
795
|
+
- application/atom+xml,application/json,application/xml,text/plain
|
796
|
+
OData-Version:
|
797
|
+
- '4.0'
|
798
|
+
response:
|
799
|
+
status:
|
800
|
+
code: 200
|
801
|
+
message: OK
|
802
|
+
headers:
|
803
|
+
cache-control:
|
804
|
+
- no-cache
|
805
|
+
content-length:
|
806
|
+
- '343'
|
807
|
+
content-type:
|
808
|
+
- application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
|
809
|
+
vary:
|
810
|
+
- Accept-Encoding
|
811
|
+
server:
|
812
|
+
- Microsoft-IIS/10.0
|
813
|
+
x-content-type-options:
|
814
|
+
- nosniff
|
815
|
+
odata-version:
|
816
|
+
- 4.0;
|
817
|
+
x-aspnet-version:
|
818
|
+
- 4.0.30319
|
819
|
+
x-powered-by:
|
820
|
+
- ASP.NET
|
821
|
+
access-control-allow-origin:
|
822
|
+
- "*"
|
823
|
+
access-control-allow-methods:
|
824
|
+
- GET
|
825
|
+
access-control-allow-headers:
|
826
|
+
- Accept, Origin, Content-Type, MaxDataServiceVersion
|
827
|
+
access-control-expose-headers:
|
828
|
+
- DataServiceVersion
|
829
|
+
date:
|
830
|
+
- Tue, 24 Apr 2018 01:58:52 GMT
|
831
|
+
connection:
|
832
|
+
- close
|
833
|
+
body:
|
834
|
+
encoding: ASCII-8BIT
|
835
|
+
string: '{"@odata.context":"http://services.odata.org/V4/OData/OData.svc/$metadata#Products","value":[{"@odata.type":"#ODataDemo.FeaturedProduct","ID":10,"Name":"Coffee","Description":"Bulk
|
836
|
+
size can of instant coffee","ReleaseDate":"1982-12-31T00:00:00Z","DiscontinuedDate":null,"Rating":1,"Price":6.99}]}'
|
837
|
+
http_version:
|
838
|
+
recorded_at: Tue, 24 Apr 2018 01:58:53 GMT
|
839
|
+
- request:
|
840
|
+
method: get
|
841
|
+
uri: http://services.odata.org/V4/OData/OData.svc/Products?%24skip=15&%24top=5
|
842
|
+
body:
|
843
|
+
encoding: US-ASCII
|
844
|
+
string: ''
|
845
|
+
headers:
|
846
|
+
User-Agent:
|
847
|
+
- Faraday v0.15.0
|
848
|
+
Accept:
|
849
|
+
- application/atom+xml,application/json,application/xml,text/plain
|
850
|
+
Content-Type:
|
851
|
+
- application/atom+xml,application/json,application/xml,text/plain
|
852
|
+
OData-Version:
|
853
|
+
- '4.0'
|
854
|
+
response:
|
855
|
+
status:
|
856
|
+
code: 200
|
857
|
+
message: OK
|
858
|
+
headers:
|
859
|
+
cache-control:
|
860
|
+
- no-cache
|
861
|
+
content-length:
|
862
|
+
- '200'
|
863
|
+
content-type:
|
864
|
+
- application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
|
865
|
+
vary:
|
866
|
+
- Accept-Encoding
|
867
|
+
server:
|
868
|
+
- Microsoft-IIS/10.0
|
869
|
+
x-content-type-options:
|
870
|
+
- nosniff
|
871
|
+
odata-version:
|
872
|
+
- 4.0;
|
873
|
+
x-aspnet-version:
|
874
|
+
- 4.0.30319
|
875
|
+
x-powered-by:
|
876
|
+
- ASP.NET
|
877
|
+
access-control-allow-origin:
|
878
|
+
- "*"
|
879
|
+
access-control-allow-methods:
|
880
|
+
- GET
|
881
|
+
access-control-allow-headers:
|
882
|
+
- Accept, Origin, Content-Type, MaxDataServiceVersion
|
883
|
+
access-control-expose-headers:
|
884
|
+
- DataServiceVersion
|
885
|
+
date:
|
886
|
+
- Tue, 24 Apr 2018 01:58:53 GMT
|
887
|
+
connection:
|
888
|
+
- close
|
889
|
+
body:
|
890
|
+
encoding: ASCII-8BIT
|
891
|
+
string: '{"@odata.context":"http://services.odata.org/V4/OData/OData.svc/$metadata#Products","value":[]}'
|
892
|
+
http_version:
|
893
|
+
recorded_at: Tue, 24 Apr 2018 01:58:53 GMT
|
894
|
+
- request:
|
895
|
+
method: get
|
896
|
+
uri: http://services.odata.org/V4/OData/OData.svc/Products/$count?%24filter=Name+eq+%27Bread%27
|
897
|
+
body:
|
898
|
+
encoding: US-ASCII
|
899
|
+
string: ''
|
900
|
+
headers:
|
901
|
+
User-Agent:
|
902
|
+
- Faraday v0.15.0
|
903
|
+
Accept:
|
904
|
+
- application/atom+xml,application/json,application/xml,text/plain
|
905
|
+
Content-Type:
|
906
|
+
- application/atom+xml,application/json,application/xml,text/plain
|
907
|
+
OData-Version:
|
908
|
+
- '4.0'
|
909
|
+
response:
|
910
|
+
status:
|
911
|
+
code: 200
|
912
|
+
message: OK
|
913
|
+
headers:
|
914
|
+
cache-control:
|
915
|
+
- no-cache
|
916
|
+
content-length:
|
917
|
+
- '120'
|
918
|
+
content-type:
|
919
|
+
- text/plain;charset=utf-8
|
920
|
+
vary:
|
921
|
+
- Accept-Encoding
|
922
|
+
server:
|
923
|
+
- Microsoft-IIS/10.0
|
924
|
+
x-content-type-options:
|
925
|
+
- nosniff
|
926
|
+
odata-version:
|
927
|
+
- 4.0;
|
928
|
+
x-aspnet-version:
|
929
|
+
- 4.0.30319
|
930
|
+
x-powered-by:
|
931
|
+
- ASP.NET
|
932
|
+
access-control-allow-origin:
|
933
|
+
- "*"
|
934
|
+
access-control-allow-methods:
|
935
|
+
- GET
|
936
|
+
access-control-allow-headers:
|
937
|
+
- Accept, Origin, Content-Type, MaxDataServiceVersion
|
938
|
+
access-control-expose-headers:
|
939
|
+
- DataServiceVersion
|
940
|
+
date:
|
941
|
+
- Tue, 24 Apr 2018 01:58:53 GMT
|
942
|
+
connection:
|
943
|
+
- close
|
944
|
+
body:
|
945
|
+
encoding: ASCII-8BIT
|
946
|
+
string: '1'
|
947
|
+
http_version:
|
948
|
+
recorded_at: Tue, 24 Apr 2018 01:58:54 GMT
|
949
|
+
- request:
|
950
|
+
method: get
|
951
|
+
uri: http://services.odata.org/V4/OData/OData.svc/Products(0)?%24expand=Categories
|
952
|
+
body:
|
953
|
+
encoding: US-ASCII
|
954
|
+
string: ''
|
955
|
+
headers:
|
956
|
+
User-Agent:
|
957
|
+
- Faraday v0.15.0
|
958
|
+
Accept:
|
959
|
+
- application/atom+xml,application/json,application/xml,text/plain
|
960
|
+
Content-Type:
|
961
|
+
- application/atom+xml,application/json,application/xml,text/plain
|
962
|
+
OData-Version:
|
963
|
+
- '4.0'
|
964
|
+
response:
|
965
|
+
status:
|
966
|
+
code: 200
|
967
|
+
message: OK
|
968
|
+
headers:
|
969
|
+
cache-control:
|
970
|
+
- no-cache
|
971
|
+
content-length:
|
972
|
+
- '326'
|
973
|
+
content-type:
|
974
|
+
- application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
|
975
|
+
vary:
|
976
|
+
- Accept-Encoding
|
977
|
+
server:
|
978
|
+
- Microsoft-IIS/10.0
|
979
|
+
x-content-type-options:
|
980
|
+
- nosniff
|
981
|
+
odata-version:
|
982
|
+
- 4.0;
|
983
|
+
x-aspnet-version:
|
984
|
+
- 4.0.30319
|
985
|
+
x-powered-by:
|
986
|
+
- ASP.NET
|
987
|
+
access-control-allow-origin:
|
988
|
+
- "*"
|
989
|
+
access-control-allow-methods:
|
990
|
+
- GET
|
991
|
+
access-control-allow-headers:
|
992
|
+
- Accept, Origin, Content-Type, MaxDataServiceVersion
|
993
|
+
access-control-expose-headers:
|
994
|
+
- DataServiceVersion
|
995
|
+
date:
|
996
|
+
- Tue, 24 Apr 2018 01:58:53 GMT
|
997
|
+
connection:
|
998
|
+
- close
|
999
|
+
body:
|
1000
|
+
encoding: ASCII-8BIT
|
1001
|
+
string: '{"@odata.context":"http://services.odata.org/V4/OData/OData.svc/$metadata#Products/$entity","ID":0,"Name":"Bread","Description":"Whole
|
1002
|
+
grain bread","ReleaseDate":"1992-01-01T00:00:00Z","DiscontinuedDate":null,"Rating":4,"Price":2.5,"Categories":[{"ID":0,"Name":"Food"}]}'
|
1003
|
+
http_version:
|
1004
|
+
recorded_at: Tue, 24 Apr 2018 01:58:54 GMT
|
1005
|
+
- request:
|
1006
|
+
method: get
|
1007
|
+
uri: http://services.odata.org/V4/OData/OData.svc/Products/$count?%24filter=Name+eq+%27NonExistent%27
|
1008
|
+
body:
|
1009
|
+
encoding: US-ASCII
|
1010
|
+
string: ''
|
1011
|
+
headers:
|
1012
|
+
User-Agent:
|
1013
|
+
- Faraday v0.15.0
|
1014
|
+
Accept:
|
1015
|
+
- application/atom+xml,application/json,application/xml,text/plain
|
1016
|
+
Content-Type:
|
1017
|
+
- application/atom+xml,application/json,application/xml,text/plain
|
1018
|
+
OData-Version:
|
1019
|
+
- '4.0'
|
1020
|
+
response:
|
1021
|
+
status:
|
1022
|
+
code: 200
|
1023
|
+
message: OK
|
1024
|
+
headers:
|
1025
|
+
cache-control:
|
1026
|
+
- no-cache
|
1027
|
+
content-length:
|
1028
|
+
- '120'
|
1029
|
+
content-type:
|
1030
|
+
- text/plain;charset=utf-8
|
1031
|
+
vary:
|
1032
|
+
- Accept-Encoding
|
1033
|
+
server:
|
1034
|
+
- Microsoft-IIS/10.0
|
1035
|
+
x-content-type-options:
|
1036
|
+
- nosniff
|
1037
|
+
odata-version:
|
1038
|
+
- 4.0;
|
1039
|
+
x-aspnet-version:
|
1040
|
+
- 4.0.30319
|
1041
|
+
x-powered-by:
|
1042
|
+
- ASP.NET
|
1043
|
+
access-control-allow-origin:
|
1044
|
+
- "*"
|
1045
|
+
access-control-allow-methods:
|
1046
|
+
- GET
|
1047
|
+
access-control-allow-headers:
|
1048
|
+
- Accept, Origin, Content-Type, MaxDataServiceVersion
|
1049
|
+
access-control-expose-headers:
|
1050
|
+
- DataServiceVersion
|
1051
|
+
date:
|
1052
|
+
- Tue, 24 Apr 2018 01:58:54 GMT
|
1053
|
+
connection:
|
1054
|
+
- close
|
1055
|
+
body:
|
1056
|
+
encoding: ASCII-8BIT
|
1057
|
+
string: '0'
|
1058
|
+
http_version:
|
1059
|
+
recorded_at: Tue, 24 Apr 2018 01:58:54 GMT
|
663
1060
|
recorded_with: VCR 4.0.0
|