Questions tagged [restler]

A micro framework that can expose any PHP class and its methods as Pragmatic and/or RESTful API.

Restler is a simple multi-format Web API Server written in PHP. It is open sourced under LGPL license.

258 questions
9
votes
1 answer

Restler not accepting boolean false

In my Restler API class I have an object defined like so (with lots of other params) class PatchTaskObj extends TaskObj { /** * @var bool|null Whether or not this Task should be pinned to the top of the list {@required false} */ …
Gargoyle
  • 9,590
  • 16
  • 80
  • 145
9
votes
5 answers

Multiple responses on node.js restler call

I've created a library for sending REST requests: var rest = require('restler'); module.exports = { beginSession: function() { var options = { method: "GET", query: {begin_session: '1'}}; rest.get('http://countly/i',…
JoseOlcese
  • 532
  • 6
  • 14
7
votes
5 answers

How to properly format PDO results? - numeric results returned as string?

With relative newness to AJAX, and now just starting to learn PDO, the added level of ReSTler has me completely boggled. Modeling the below code from Restler samples, I don't know how to change the output format from what PDO is returning to what…
GDP
  • 8,109
  • 6
  • 45
  • 82
6
votes
2 answers

Restler always returns 404: Not found

I have installed Restler on my local server to test and make some APIs for my project. Api requests are handled via http://localhost/myproject/api/. The problem is that everytime i try to make a request i get the following error: { "error": { …
siannone
  • 6,617
  • 15
  • 59
  • 89
6
votes
1 answer

How do I download a website and write it to a file using Restler?

I would like to download a website (html) and write it to an .html file with node and restler. https://github.com/danwrong/Restler/ Their initial example is already halfway there: var sys = require('util'), rest =…
digit
  • 1,513
  • 5
  • 29
  • 49
6
votes
2 answers

Restler RC3 Install

Is there a way to 'copy and paste' the RC3 to my host without having to run 'make composer-install'? Unfortunately my host is lousy and doesn't allow for this. Restler 2 was as easy to install as putting the files into a directory and making a few…
RowdyRobot
  • 126
  • 4
5
votes
3 answers

AFNetworking AFHTTPClient Class

I’m fairly new to iOS programming, especially when it comes to webservices. I’m developing a App for academic purposes, and I need to communicate with my server, currently using AFNetworking2 and Restler/php, everything work when it comes to GET…
Bruno Tereso
  • 227
  • 1
  • 5
  • 15
4
votes
2 answers

Luracast Restler 3 RC6: How to rename XML objects names

I have a code such as: array( 'file' => array( array( 'filename' => 'test1.jpg', 'modified' => '2015-01-01 00:00:00', …
Kirbo
  • 381
  • 1
  • 12
4
votes
1 answer

Using authentication on different method parameters (Restler 3)

I want to restrict access to a method if a parameter has a specific value. Lets take for example this class: Simple.php: class Simple { function item($name) { if($name == "somerestricted") { // Here should…
nikeee
  • 10,248
  • 7
  • 40
  • 66
4
votes
2 answers

Getting HTTP Response using restler in Node.js

I don't understand why this code doesn't work for me var rest = require('restler'); var getResp = function(url){ var resp =""; rest.get(url).on('complete',function(response){ resp = response.toString(); }); …
Nick Ginanto
  • 31,090
  • 47
  • 134
  • 244
4
votes
2 answers

Restler: Complex Object Types as Parameters

Hello Restler friends, I'm currently trying to switch to Restler as our main Rest-Framework. What really motivated my decision was the swagger compliance. I find it quite important to have a nice autogenerated documentation for an ongrowing…
Gingonic
  • 41
  • 8
4
votes
0 answers

Autoload class issue with Restler and log4php

I am having some trouble with creating my API using Restler while using log4php. It seems to be a clash in the autoloaders but I am not certain. For reference I will try just showing the relevant code sections so it will hopefully help. In…
4
votes
1 answer

Restler always returns not found

I'm stuck here, in wamp I run everything and works fine, however, when I tried to install my api in a centos box, I always get a "Not Found" error. I dont know what else to do! Even the say/hello example fails... Is there any specification of the…
danielrvt
  • 10,177
  • 20
  • 80
  • 121
3
votes
2 answers

using camel casing for function name in restler

This is the web service file _ws.php
user642298
  • 41
  • 3
3
votes
1 answer

php Restler Routes

I am using Restler 2.0 and I'm trying to add a new route based on the CRUD example $o['GET']['author/:name/:email']=array ( 'class_name' => 'Author', 'method_name' => 'getLogin', 'arguments' => array ( 'name' => 0, 'email' => 1, …
1
2 3
17 18