{"_id":"nativescript-okhttp","_rev":"27-57a4945a0f7806c2a9075dc556c327e1","name":"nativescript-okhttp","dist-tags":{"latest":"0.0.9"},"versions":{"0.0.1":{"name":"nativescript-okhttp","version":"0.0.1","keywords":["NativeScript"],"author":{"url":"https://github.com/kiril-stanoev/","name":"Kiril Stanoev","email":"kiril.stanoev@gmail.com"},"license":"MIT","_id":"nativescript-okhttp@0.0.1","maintainers":[{"name":"kstanoev","email":"kiril.stanoev@gmail.com"}],"homepage":"https://github.com/kiril-stanoev/nativescript-okhttp","bugs":{"url":"https://github.com/kiril-stanoev/nativescript-okhttp/issues"},"dist":{"shasum":"ce35d6d7c8e40e01effa3dfc99f2465831db062d","tarball":"https://registry.npmjs.org/nativescript-okhttp/-/nativescript-okhttp-0.0.1.tgz","integrity":"sha512-nDJ44ZtQHQBj/blszpOw3jFnun/4eNxmC+Ex2OBuB8ArAfvqFdamwXaPFbTaikPyRgIrbFrMOCqR0z7Dyo3Q4g==","signatures":[{"sig":"MEUCIBABCRXDQ82A5bTfmKC9PjuOk8119RThc8bxjiqkAM/FAiEAqnXs254Ize9aX6HjCOVu+mOA+jeWnXtT1q5rcd4YrHY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"nativescript-okhttp.js","_from":".","_shasum":"ce35d6d7c8e40e01effa3dfc99f2465831db062d","gitHead":"f4a312512250d18260114f10b97d82d7844259a9","scripts":{},"_npmUser":{"name":"kstanoev","email":"kiril.stanoev@gmail.com"},"repository":{"url":"git+https://github.com/kiril-stanoev/nativescript-okhttp.git","type":"git"},"_npmVersion":"2.11.3","directories":{},"_nodeVersion":"0.12.7","nativescript":{"platforms":{"android":"1.4.0"}}},"0.0.2":{"name":"nativescript-okhttp","version":"0.0.2","keywords":["NativeScript"],"author":{"url":"https://github.com/kiril-stanoev/","name":"Kiril Stanoev","email":"kiril.stanoev@gmail.com"},"license":"MIT","_id":"nativescript-okhttp@0.0.2","maintainers":[{"name":"kstanoev","email":"kiril.stanoev@gmail.com"}],"homepage":"https://github.com/kiril-stanoev/nativescript-okhttp","bugs":{"url":"https://github.com/kiril-stanoev/nativescript-okhttp/issues"},"dist":{"shasum":"a14a87ef0744014624839cd4ab4d19fe0cd9e763","tarball":"https://registry.npmjs.org/nativescript-okhttp/-/nativescript-okhttp-0.0.2.tgz","integrity":"sha512-LEhY6S6ErYq+JurZyOpY0rvZbs1MrJJvuU5AyujOaT0GweA6n7AYdBacHMVbIeVTgA/Q2qS9Yq4HHsBAn4pPDg==","signatures":[{"sig":"MEUCIQC9PfOJoe+hSkVMThxBlvl/C5BWeT5je+5bTHOtx/JsNQIgZvO3JqSFsu1o/rJGc4r+Xw8Bgs5cIUNAgfA0A/et8gw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"nativescript-okhttp.js","_from":".","_shasum":"a14a87ef0744014624839cd4ab4d19fe0cd9e763","gitHead":"e1c5dd2c54c2a10a42839133da31932ff2d1238b","scripts":{},"_npmUser":{"name":"kstanoev","email":"kiril.stanoev@gmail.com"},"repository":{"url":"git+https://github.com/kiril-stanoev/nativescript-okhttp.git","type":"git"},"_npmVersion":"2.11.3","description":"","directories":{},"_nodeVersion":"0.12.7","nativescript":{"platforms":{"android":"1.4.0"}}},"0.0.3":{"name":"nativescript-okhttp","version":"0.0.3","keywords":["NativeScript"],"author":{"url":"https://github.com/kiril-stanoev/","name":"Kiril Stanoev","email":"kiril.stanoev@gmail.com"},"license":"MIT","_id":"nativescript-okhttp@0.0.3","maintainers":[{"name":"kstanoev","email":"kiril.stanoev@gmail.com"}],"homepage":"https://github.com/kiril-stanoev/nativescript-okhttp","bugs":{"url":"https://github.com/kiril-stanoev/nativescript-okhttp/issues"},"dist":{"shasum":"c92fade8c7610ed653dfe18768d517fb8420c475","tarball":"https://registry.npmjs.org/nativescript-okhttp/-/nativescript-okhttp-0.0.3.tgz","integrity":"sha512-ECxTBh7O/W6PKJhY37a5lOI5kk+OEEeHn9K+JHn0ymAGFQgc3pD5M+ownfLLH7towojRl2bisutfzKTdt/zIEw==","signatures":[{"sig":"MEYCIQDUTKRNljYB5ZAErgJQCiuhudCyzugLNGCcpIAOFdQG5wIhAISZ4F8SRVMm6AGkD/9j1QGPh+MU2fElZgxtppsBiD8L","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"nativescript-okhttp.js","_from":".","_shasum":"c92fade8c7610ed653dfe18768d517fb8420c475","gitHead":"e1c5dd2c54c2a10a42839133da31932ff2d1238b","scripts":{},"_npmUser":{"name":"kstanoev","email":"kiril.stanoev@gmail.com"},"repository":{"url":"git+https://github.com/kiril-stanoev/nativescript-okhttp.git","type":"git"},"_npmVersion":"2.11.3","description":"","directories":{},"_nodeVersion":"0.12.7","nativescript":{"platforms":{"android":"1.4.0"}}},"0.0.5":{"name":"nativescript-okhttp","version":"0.0.5","keywords":["NativeScript"],"author":{"url":"https://github.com/kiril-stanoev/","name":"Kiril Stanoev","email":"kiril.stanoev@gmail.com"},"license":"MIT","_id":"nativescript-okhttp@0.0.5","maintainers":[{"name":"kstanoev","email":"kiril.stanoev@gmail.com"}],"homepage":"https://github.com/kiril-stanoev/nativescript-okhttp","bugs":{"url":"https://github.com/kiril-stanoev/nativescript-okhttp/issues"},"dist":{"shasum":"2ace62946e89a022c3ca530af8933c34ec8d8cfa","tarball":"https://registry.npmjs.org/nativescript-okhttp/-/nativescript-okhttp-0.0.5.tgz","integrity":"sha512-EQqm4gScwgO1F09u9K4Vrk+FAVTNpUIwB+4/j8By6zbX0/SldBBDrcdALHpnGKVJlOwSq4XiaFm1NnMTMIcQpw==","signatures":[{"sig":"MEUCIEJm4e1R2t8VMJ5LLwbW9ll9PWUXOZbyCVZEw+EdW8hxAiEA5DfQo0mQCgOli8bqNpxcuMzXOWmc2c+Dql7Al2C3Kn8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"nativescript-okhttp.js","_from":".","_shasum":"2ace62946e89a022c3ca530af8933c34ec8d8cfa","gitHead":"65acdcd2f23c553f4bbfcbd7ecb50bb0a95fb9c4","scripts":{},"_npmUser":{"name":"kstanoev","email":"kiril.stanoev@gmail.com"},"repository":{"url":"git+https://github.com/kiril-stanoev/nativescript-okhttp.git","type":"git"},"_npmVersion":"2.11.3","description":"[OkHttp] is an HTTP client that supports:","directories":{},"_nodeVersion":"0.12.7","nativescript":{"platforms":{"android":"1.4.0"}}},"0.0.6":{"name":"nativescript-okhttp","version":"0.0.6","keywords":["NativeScript"],"author":{"url":"https://github.com/kiril-stanoev/","name":"Kiril Stanoev","email":"kiril.stanoev@gmail.com"},"license":"MIT","_id":"nativescript-okhttp@0.0.6","maintainers":[{"name":"kstanoev","email":"kiril.stanoev@gmail.com"}],"homepage":"https://github.com/kiril-stanoev/nativescript-okhttp","bugs":{"url":"https://github.com/kiril-stanoev/nativescript-okhttp/issues"},"dist":{"shasum":"2cde1edc00b31897de3651318b81a9282599dfc6","tarball":"https://registry.npmjs.org/nativescript-okhttp/-/nativescript-okhttp-0.0.6.tgz","integrity":"sha512-4eocDF5qwocEzhv1FhFskW7JepfiPsQX3GVMezj2Huj3ot/z2qkFZabIF1eWXxBkAMxb6gfdt9Owj4JwMunqbA==","signatures":[{"sig":"MEQCIBQGt5Fc/x56XMd4FHmeTmZf/xclp34IaZYeUCEba60IAiBzMXeMb7HOh/EWWNVssIP4luHdF71rJbc2bi/07XiKtA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"nativescript-okhttp.js","_from":".","_shasum":"2cde1edc00b31897de3651318b81a9282599dfc6","gitHead":"3371c7a38faa10e1f124162bb551c9340331650c","scripts":{},"_npmUser":{"name":"kstanoev","email":"kiril.stanoev@gmail.com"},"repository":{"url":"git+https://github.com/kiril-stanoev/nativescript-okhttp.git","type":"git"},"_npmVersion":"2.11.3","description":"[`OkHttp`](http://square.github.io/okhttp/) is an HTTP client that supports:","directories":{},"_nodeVersion":"0.12.7","nativescript":{"platforms":{"android":"1.4.0"}}},"0.0.7":{"name":"nativescript-okhttp","version":"0.0.7","keywords":["NativeScript"],"author":{"url":"https://github.com/kiril-stanoev/","name":"Kiril Stanoev","email":"kiril.stanoev@gmail.com"},"license":"MIT","_id":"nativescript-okhttp@0.0.7","maintainers":[{"name":"kstanoev","email":"kiril.stanoev@gmail.com"}],"homepage":"https://github.com/kiril-stanoev/nativescript-okhttp","bugs":{"url":"https://github.com/kiril-stanoev/nativescript-okhttp/issues"},"dist":{"shasum":"5d4ddcdbab8d553c494eddcad1f4e683224087a2","tarball":"https://registry.npmjs.org/nativescript-okhttp/-/nativescript-okhttp-0.0.7.tgz","integrity":"sha512-ritpTlNa780XrNsDVGXClA9KmZ0b9vSX8KX1y+C6d/7kuihHFtnblspWwuE/iOaOpN7IZYHckFnl6qTuGLJFZw==","signatures":[{"sig":"MEUCIGpCzDxMfljbomehzeT0/VVHUG30/qSoQbyw6F3QciTCAiEAm07jc5phoz80uKxO1j049qzI+h0Sh6kR4KS7Nmg5cNg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"nativescript-okhttp.js","_from":".","_shasum":"5d4ddcdbab8d553c494eddcad1f4e683224087a2","gitHead":"cbb8ebed3e0a363bbc6f982253ac33258f94002a","scripts":{},"_npmUser":{"name":"kstanoev","email":"kiril.stanoev@gmail.com"},"repository":{"url":"git+https://github.com/kiril-stanoev/nativescript-okhttp.git","type":"git"},"_npmVersion":"2.11.3","description":"[`OkHttp`](http://square.github.io/okhttp/) is an HTTP client that supports:","directories":{},"_nodeVersion":"0.12.7","nativescript":{"platforms":{"android":"1.4.0"}}},"0.0.8":{"name":"nativescript-okhttp","version":"0.0.8","keywords":["NativeScript"],"author":{"url":"https://github.com/kiril-stanoev/","name":"Kiril Stanoev","email":"kiril.stanoev@gmail.com"},"license":"MIT","_id":"nativescript-okhttp@0.0.8","maintainers":[{"name":"kstanoev","email":"kiril.stanoev@gmail.com"}],"homepage":"https://github.com/kiril-stanoev/nativescript-okhttp","bugs":{"url":"https://github.com/kiril-stanoev/nativescript-okhttp/issues"},"dist":{"shasum":"31ae24d192e1c102483d926d10204b96a033c107","tarball":"https://registry.npmjs.org/nativescript-okhttp/-/nativescript-okhttp-0.0.8.tgz","integrity":"sha512-01SbD976zi7qrxGWbmt1BGhueScwzkWunmRXsI4Mh7A1u1/5SlNIa9NjVcPpcC7xfMUYJFnbv0BLwWXjHBfG7Q==","signatures":[{"sig":"MEQCIDtsn8rS1e8/39HDECqAysI/cf1ftRi0TOXB63XEIYavAiAZhoW9zkb/5DevMn92oCBsPSqgEeX7nQYaMllWCou/Vw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"nativescript-okhttp.js","_from":".","_shasum":"31ae24d192e1c102483d926d10204b96a033c107","gitHead":"b12162ebf293b75c37d2bf8063fcc5198575dd12","scripts":{},"_npmUser":{"name":"kstanoev","email":"kiril.stanoev@gmail.com"},"repository":{"url":"git+https://github.com/kiril-stanoev/nativescript-okhttp.git","type":"git"},"_npmVersion":"2.11.3","description":"[OkHttp](http://square.github.io/okhttp/) is an HTTP client that supports:","directories":{},"_nodeVersion":"0.12.7","nativescript":{"platforms":{"android":"1.4.0"}}},"0.0.9":{"name":"nativescript-okhttp","version":"0.0.9","keywords":["NativeScript"],"author":{"url":"https://github.com/kiril-stanoev/","name":"Kiril Stanoev","email":"kiril.stanoev@gmail.com"},"license":"MIT","_id":"nativescript-okhttp@0.0.9","maintainers":[{"name":"tns-bot","email":"nativescript@telerik.com"}],"homepage":"https://github.com/kiril-stanoev/nativescript-okhttp","bugs":{"url":"https://github.com/kiril-stanoev/nativescript-okhttp/issues"},"dist":{"shasum":"745d27946a909d9af2c9ec40ea2d87e5ed852a47","tarball":"https://registry.npmjs.org/nativescript-okhttp/-/nativescript-okhttp-0.0.9.tgz","fileCount":43,"integrity":"sha512-RCH3a7fI1D03ImnQ3uILIP5cTtw7XmyN03SlvJAyeo0FrDTNp7j26EI119Kwoyp7IQKHxiunIrpW8MKTv6rxwQ==","signatures":[{"sig":"MEUCIDZGbHfXXU/moU5vdbdHOa+jC2H2H7wVTwIBdeC42BBMAiEAmkktFVUV4grzQ/gS+laGFHFP8CwUmiY0v6QYCV24SZ0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1731342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYXeLCRA9TVsSAnZWagAAfm8P/R7Z/JZ0MCKrkOn7LHI8\nytxbnnqZjp8PwF3qkP7VhzT70eTMM7GargMC+tJ/hXjbR5gWEUYiONFu7TQS\nEt+VxKdFhDLnPHeaE+9nrpdcwJdzXZXDC2IgSf0CBcj2A/ooUEiLRIS/MRk7\nKxbTahoJA+5hXyOElUjQh0Br/SCuhRPHSBXlRCyPlOM96URiqRssHw12Pw5n\n2ya0VBpUIX1SBtkdvOWeTvMpvc6Sfh+9146rdk4Jd6Kjn2vfvArPrIUaTnX7\nftC7cPyjvNHZKx4curowoufC3VV9rGVvvjsmzvf7KZH9CJPjXbkFHEW2GQeR\nLqrhIOMNZvKQKbCf6nV17fCFnp4KkSh9TbL7c8Zd2g4vI35KQV7HdszDAanv\ncq1jHkvZDkwmbunwZ/HxmGFC/cE7mT3Cf8Vcn/EODKfSjzoHNAEcdqdK4fIH\na9gqpiakR/ypR4pQv3m8L1IddvLUSr5e/qR3MGXF5qD62jFQ18p72kn50ZyF\ngiL44gDUYNa8Vq7bRTcyCyHCu0TxBiJ21OmkpoQERN0wwirQfKj8cHWOzFDW\nAryXL3gQZ82Qr6Ef2OeWAx3hjIBV40gXgBTC2OWaDQkKsPeN0/vqersdSgV0\nHfugkcgwc3GXIt4oAq/LlcvXvIaBM2PtH5AwRkorOZOTbvP5Liyr4xu4j23f\n0fPq\r\n=VrGo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"nativescript-okhttp.js","_from":"file:nativescript-okhttp-0.0.9.tgz","_spec":"nativescript-okhttp","_where":"/Users/vchimev/Work","_shasum":"31ae24d192e1c102483d926d10204b96a033c107","_npmUser":{"name":"tns-bot","email":"nativescript@telerik.com"},"_inBundle":false,"_location":"/nativescript-okhttp","_resolved":"","_integrity":"","_requested":{"raw":"nativescript-okhttp","name":"nativescript-okhttp","type":"tag","rawSpec":"","registry":true,"saveSpec":null,"fetchSpec":"latest","escapedName":"nativescript-okhttp"},"deprecated":false,"repository":{"url":"git+https://github.com/kiril-stanoev/nativescript-okhttp.git","type":"git"},"_npmVersion":"6.2.0","_requiredBy":["#USER","/"],"description":"[OkHttp](http://square.github.io/okhttp/) is an HTTP client that supports:","directories":{},"_nodeVersion":"10.7.0","nativescript":{"platforms":{"android":"1.4.0"}},"_hasShrinkwrap":false,"_phantomChildren":{},"bundleDependencies":false,"_npmOperationalInternal":{"tmp":"tmp/nativescript-okhttp_0.0.9_1533114251129_0.4526882378591912","host":"s3://npm-registry-packages"}}},"time":{"created":"2015-10-19T09:04:17.172Z","modified":"2025-09-15T18:11:58.533Z","0.0.1":"2015-10-19T09:04:17.172Z","0.0.2":"2015-10-19T09:11:29.741Z","0.0.3":"2015-10-19T09:30:08.741Z","0.0.5":"2015-10-19T10:05:58.859Z","0.0.6":"2015-10-19T12:00:11.764Z","0.0.7":"2015-10-19T17:19:59.424Z","0.0.8":"2015-10-21T05:55:28.096Z","0.0.9":"2018-08-01T09:04:11.348Z"},"bugs":{"url":"https://github.com/kiril-stanoev/nativescript-okhttp/issues"},"author":{"url":"https://github.com/kiril-stanoev/","name":"Kiril Stanoev","email":"kiril.stanoev@gmail.com"},"license":"MIT","homepage":"https://github.com/kiril-stanoev/nativescript-okhttp","keywords":["NativeScript"],"repository":{"url":"git+https://github.com/kiril-stanoev/nativescript-okhttp.git","type":"git"},"description":"[OkHttp](http://square.github.io/okhttp/) is an HTTP client that supports:","maintainers":[{"email":"shout@igor-randjelovic.com","name":"rigor789"},{"email":"oss@nativescript.org","name":"nativescript-bot"},{"email":"nativescript@telerik.com","name":"tns-bot"}],"readme":"# NativeScript plugin for OkHttp\r\n\r\n[OkHttp](http://square.github.io/okhttp/) is an HTTP client that supports:\r\n\r\n- HTTP/2 and SPDY support allows all requests to the same host to share a socket.\r\n- Connection pooling reduces request latency (if SPDY isn’t available).\r\n- Transparent GZIP shrinks download sizes.\r\n- Response caching avoids the network completely for repeat requests.\r\n\r\n![](http://content.screencast.com/users/kiril/folders/Jing/media/fd6b67b1-ffed-48ec-b16c-554dcb08af8f/2015-10-19_1516.png)\r\n\r\n# Installation\r\n\r\nRun the following command from the root of your project:\r\n\r\n```\r\n$ tns plugin add nativescript-okhttp\r\n```\r\n\r\nThis command automatically installs the necessary files, as well as stores nativescript-okhttp as a dependency in your project's `package.json` file.\r\n\r\n# Usage\r\n\r\nTo use the social share module you must first `require()` it. After you `require()` the module you have access to its APIs.\r\n\r\n``` js\r\nvar okHttp = require(\"nativescript-okhttp\");\r\n```\r\n\r\n# API\r\n\r\n### getString(url)\r\n\r\nThe `getString()` method downloads a URL as a string.\r\n\r\n``` js\r\nvar okHttp = require(\"nativescript-okhttp\");\r\nfunction pageLoaded(args) {\r\n    var result = okHttp.getString(\"http://www.google.com/\");\r\n    console.log(result);\r\n}\r\nexports.pageLoaded = pageLoaded;\r\n```\r\n### getJSON(url)\r\n\r\nThe `getString()` method downloads a URL as a string.\r\n\r\n``` js\r\nvar okHttp = require(\"nativescript-okhttp\");\r\nfunction pageLoaded(args) {\r\n    var json = okHttp.getJSON(\"https://api.github.com/gists/c2a7c39532239ff261be\");\r\n    console.log(\"JSON url: \" + json.url);\r\n}\r\nexports.pageLoaded = pageLoaded;\r\n```\r\n### getImage(url)\r\n\r\nThe `getImage()` method returns an image as a stream from a remote URL.\r\n\r\nIn this example, we will download an image from umgur (http://i.imgur.com/sXG9IHW.jpg) and we will share it ot Facebook using a social share plugin by @tjvantoll (https://github.com/tjvantoll/nativescript-social-share).\r\n\r\n![](http://content.screencast.com/users/kiril/folders/Jing/media/829344ad-7cb3-4e2a-8741-571d8c7a8fdc/2015-10-19_1516.png)\r\n\r\n``` js\r\nvar socialShare = require(\"nativescript-social-share\");\r\nvar imageSource = require(\"image-source\");\r\nvar okHttp = require(\"nativescript-okhttp\");\r\nfunction pageLoaded(args) {\r\n    var inputStream = okHttp.getImage(\"http://i.imgur.com/sXG9IHW.jpg\");\r\n    var image = imageSource.fromData(inputStream);\r\n    socialShare.shareImage(image);\r\n}\r\nexports.pageLoaded = pageLoaded;\r\n```\r\n![](http://content.screencast.com/users/kiril/folders/Jing/media/4faa243e-09f0-458c-a7a2-80e86c6be698/2015-10-19_1517.png)\r\n![](http://content.screencast.com/users/kiril/folders/Jing/media/844cc4d0-8a34-4341-8730-ead1f2e002ea/2015-10-19_1517.png)\r\n\r\n","readmeFilename":"README.md","users":{"fadihania":true}}