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
0
votes
1 answer

OrientDB, OrientDB-PHP, and Restler - Cannot open the storage

I am having a problem opening up an OrientDB database (orientdb-community-1.6.3). I can access the server using $db = new OrientDB(...). I can connect with my user admin using $dbConnected = $db->connect(...). But opening my database, or checking…
Kent
  • 1,374
  • 1
  • 15
  • 29
0
votes
2 answers

OAuth2_GrantType_UserCredentials with Restler

Does anybody have a sample with OAuth2_GrantType_UserCredentials and Restler ? I've tried myself but it's very difficult to understand Thanks
Alban
  • 23
  • 1
  • 4
0
votes
1 answer

AFNetwork 2.0 POST results in a 403 error

I'm using AFNetworking 2 to perform a simple post operation: [self.manager POST:@"person" parameters:(NSDictionary *)parameters constructingBodyWithBlock:nil success:^(AFHTTPRequestOperation *operation, id responseObject) { …
Gargoyle
  • 9,590
  • 16
  • 80
  • 145
0
votes
1 answer

Why Luracast Restler is not working on a remote server as it is on a localhost?

I copied the Luracast Restler "Hello World" Math Class from a Localhost to a remote server but it is not running. http://www.sensorzapp.com/SensorZapp/test/index.php/math/multiply/2/3 Probaly the index.php is not connecting to the restler.php Can…
Hugo
  • 1,558
  • 12
  • 35
  • 68
0
votes
1 answer

Restler GET works, but POST returns 404

I have a simple class for Restler (http://luracast.com/products/restler) like so: class Team extends PostgreSQL { function post($name) { } function players($teamId) { } } If I run a curl GET, like so: curl…
Gargoyle
  • 9,590
  • 16
  • 80
  • 145
0
votes
1 answer

Url Rewrite in a subdirectory

I'm using Restler for building REST API on an Apache Server and I have some url rewrite problems. Here are my directories : /api:   /vendor   ...   .htaccess (1st level)   /public :     /examples     /test     /src     .htaccess (2nd…
cocoggu
  • 401
  • 7
  • 18
0
votes
0 answers

submit a path like /home/ahmad/local

Hi Restler/Swagger friends There is a problem when i post a url like: /home/ahmad/local it returns the following error: Request URL http://s1/RestlerUpdate/complextypestests/_url/%2Fhome%2Fahmad%2Flocal Response Body [unable to parse as json;…
ahmad alhilal
  • 175
  • 2
  • 4
  • 11
0
votes
1 answer

Restler, not serving data with force download set to true?

I have a weird problem here, When using the restler api, it seems as if the headers Content Type resets even if I forcefully set it to something different... It seems as if $r = new Restler(); $r->setSupportedFormats('JsonFormat'); Always resets it…
jaggy
  • 103
  • 2
  • 7
0
votes
1 answer

UploadFormat and annotations

Now that the UploadFormat class is available, I have one question about it : Is the Upload format compatible with Restler annotations ? If yes : how to use it ? "@param file $file" ? If no : So I don't understand the meaning of this class. How to…
cocoggu
  • 401
  • 7
  • 18
0
votes
1 answer

testing an array as property of custom class

How can i define an array as a property in model class? let me conclude what i did... my model class that contains an array class Author { /** * @var string {@from body} * name of the Author {@required true} */ …
ahmad alhilal
  • 175
  • 2
  • 4
  • 11
0
votes
1 answer

processing inner object values that submitted from testing side to service side

Hi Restler/Swagger friends, I have a problem when trying to submit values of object that have inner object values to service side.. what happened that object values submitted but inner object values didn't submitted to the service side or submitted…
ahmad alhilal
  • 175
  • 2
  • 4
  • 11
0
votes
1 answer

Non-restricted Restler documentation

In the restler documentation https://github.com/Luracast/Restler/tree/master/public/examples/_010_access_control it is said: "This example shows how you can extend the authentication system to create a robust access control system. As a added bonus…
Jack
  • 71
  • 5
0
votes
1 answer

HTML response support for Restler 3 APIs

I need to support different response formats like JSON and HTML, so far this was good with JSON response formats, now I tried to support HTML response from my APIs and facing issues. I need to return JSON response from some of the APIs and HTML…
Siva
  • 1,123
  • 2
  • 14
  • 25
0
votes
1 answer

how do I know which api is called in iAuthenticate.__isAllowed

I use Restler as the OAuth Server, and implement iAuthenticate.__isAllowed in OAuthServer public function __isAllowed() { return self::$server->verifyResourceRequest(static::$request, null, $scope ); } when i have multiple apis like $r = new…
0
votes
1 answer

Is it possible to use stream in Restler3 PHP?

We are using Luracast Restler3 for our project. Some of our API calls return very large amounts of data. Might be a .CSV file of 100 00 lines or more, and of course takes even more memory as JSON or XML. We will run out of memory in Restler…
DarkVader
  • 117
  • 1
  • 10