areiks / lsxauthswift Goto Github PK
View Code? Open in Web Editor NEWxAuth Authorization header generator for Swift
License: MIT License
xAuth Authorization header generator for Swift
License: MIT License
Hi Lukasz, thanks for this library! I'm able to use it to login to the Instapaper API, but I haven't figured out a way to send input parameters to API calls. For example, I'm trying to access the "/api/1/bookmarks/list" endpoint, and send in "limit: 500" as the input parameters. I'm using your example code and calling:
let authorizationHeader = LSXAuthSwift.generateAuthorizationHeader(url: InstapaperDataSource.listBookmarksURL)
let headers = [
"Authorization" : authorizationHeader,
"Content-Type": "application/x-www-form-urlencoded; charset=utf-8",
"Accept":"application/json"
]
let params: [String: Any] = ["limit": 500]
Alamofire.request(InstapaperDataSource.listBookmarksURL, method: .post, parameters: params, headers: headers).responseJSON(completionHandler: { (response) in
but the Instapaper server always gives me a 403 http code. If I set "params" to just be empty ("[:]"), it returns the first 25 results as expected. Have you gotten this to work in your own apps?
Thanks again for the library!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.