REST (REpresentational State Transfer) is a simple stateless architecture that generally runs over HTTP. It is an "architectural style" that basically exploits the existing technology and protocols of the Web, including HTTP (Hypertext Transfer Protocol) and XML. REST is easy to use than the well-...
0
votes
0answers
15 views
Java Client that consumes a RESTful Web Service created using Jersey 2
I'm learning web services using Java. I'm technically a noob, this is the code I've written, which works.
I just don't know which method has what advantage over another, like which one is more secure? ...
0
votes
1answer
62 views
REST API wrapper testing
I'm writing wrapper for REST API of a service. In my wrapper I have quite simple method:
...
1
vote
1answer
57 views
RESTful backend API for user account
I have made a RESTful API built with Node.js, Express, Basic-auth and Mongoose. it will respond JSON.
This is the folder structure:
...
3
votes
2answers
51 views
Basic API wrapper around a Restful service - follow-up
This is a follow up from my previous post: Basic API wrapper around a Restful service
I'm writing a basic wrapper around a restful service that returns a list of Stores. Naturally, I want to make it ...
2
votes
0answers
79 views
JSON REST client proxy generator
Trying to create something really lightweight. Sources are on GitHub.
To create a proxy we need to define an interface first, e.g.:
...
0
votes
2answers
46 views
Laravel Wordpress REST API Controller
For a Laravel project I needed to show latest three blog posts on the homepage.
The blog was made with Wordpress and after some research I found a cool plugin called REST API that allows to get a json ...
3
votes
2answers
178 views
Basic API wrapper around a Restful service
I'm writing a basic wrapper around a restful service that returns a list of Stores. I'm using RestSharp which I'm injecting into the class.
Naturally, I want to make it completely testable (that's a ...
4
votes
1answer
42 views
Securely convert and return a user selected file
I designed a Python3 webservice which gets a file name, looks for this file in a local folder, converts it using an external software, then sends the converted file to the user.
For this example, the ...
4
votes
0answers
31 views
Manage Labels in a Gitlab Project
Background
This is the first (and only) Go program I've written so far.
My employer just formed a small team to make a prototype written in Go ready for production, so I (and everyone else on my ...
6
votes
2answers
101 views
Powershell cmdlet authenticating to Aerohive API
After dipping my toes in PowerShell for over a year i think it is time for creating a real cmdlet. My first mission was creating a regular PS script to take in a .csv and create a wifi account using ...
4
votes
3answers
76 views
Python wrapper class around HTTP API
I wrote this little class to wrap around a work-in-progress, poorly documented API and I'd like to know what else can be improved. I feel like there's a lot of repetition in the functions and I'd love ...
5
votes
0answers
70 views
Function to conect to Firebase Rest API via Access VBA
This is the application for small school, which will store students' info in Firebase and also retrieve data from Firebase. I am using JSON Parser to parse the data and save the same in Access tables.
...
0
votes
0answers
28 views
Factory for ListenableFutureCallbak
I'm developing a Rest API, and at the moment i have a bunch of controllers like this one:
...
2
votes
0answers
59 views
REST web service to interface with a customer database
In what ways could I improve this? Does it look good? Any security concerns? I am using Jersey, Jackson and JPA. What about the architecture? I basically have ...
5
votes
1answer
57 views
Python wrapper for Instagram API
This code wraps the user endpoint and media endpoint of Instagram API. Any best practices/ styles or glaring bugs you can see? I wrote some unit tests for each class but did not include for ...
1
vote
1answer
56 views
Laravel controller to update appointment requests
My question/refactor is similar to what is found here:
Laravel controller for form validation skinny
However, I feel that the answer is for 5.0 and not 5.2. This question does not pertain only to one ...
0
votes
2answers
44 views
Exception handling in URL builder method
I have a method which is part of a request-handling class. It creates a URL, depending on the resource send request.
This is a part of the REST service:
...
1
vote
0answers
58 views
3
votes
1answer
175 views
Simple Calculator RESTfull API on Java
I have written a small calculator REST API and I need someone to look the structure and design of what I did. I want to know how I can make it better. Here is an example with multiplication. Other ...
-1
votes
1answer
76 views
Accepting any object and returning the object
I have been tinkering with generic methods in Java but still haven't figured out a way to optimize this code. Here I need to write similar piece of code for both plan and add-on.
...
3
votes
2answers
107 views
Middleware for a client
I'm developing a middleware for my client and it's found that there are some delay when executing the process. We are currently investigating what's the exact causes of the issue, from architecture ...
0
votes
0answers
41 views
Using actors to collect paged data structures exposed through REST API
I've come up with a small exercise to learn scala consisting of making a client that assembles a graph available as a resource. The API server responds with a paged list of edges, in the form of ...
2
votes
0answers
30 views
Node.JS HTTP shortcut wrapper
The Node.JS HTTP and HTTPS modules only provide .get shortcut function, unlike AngularJS's $http which provides them all. I went ...
1
vote
1answer
270 views
Thread safe REST API
My assignment was to develop a REST service that will provide Airport information. This service is assumed to be used by multiple users, therefore data consistency (thread safety) and responding fast ...
3
votes
0answers
91 views
REST API calls to BIG-IP LTM to get the status of pool members
This code calls the iControl REST API provided by BIG-IP LTM. Trying to get the list of the pools, it's current status and the pool members associated with the pool.
My code works like this, based on ...
4
votes
1answer
152 views
REST API with Ruby on Rails and ReactJS
I'm currently working on building a simple REST API using Ruby on Rails. I noticed that a lot of the things I did were a bit redundant, especially the models. Just to clarify: I want this to be a REST ...
0
votes
0answers
37 views
Spring: Redirecting to a REST url on click
I have a page where a user can click on a link and send them to another url where the path variable is the user name.
So example: user name is bmarkham. bmarkham is on www.website.com/welcome. ...
3
votes
2answers
577 views
Web dashboard using many REST API requests
I have created REST API in codeigniter. REST sever created in codeigniter 3.0 and REST client created codeigniter 2.x.x.
I have wrote simple code for login. After login client created dashboard page....
5
votes
2answers
84 views
Tracking Containers in a Train Station
This is a time line for control over the events of some containers in a train station.
It gets all the data to build the time line by getting a JSON from a database via REST service. The app resets ...
1
vote
1answer
53 views
Java REST WS with DB
I want to get the feedback this code about the best practice I should follow and if I am using the connection pooling properly.
I have classes as follows:
...
-2
votes
1answer
83 views
Java REST WS function calling DB taking lot of time
I have a REST WS in Java using jersey that connects to database. I don't know what should be the ideal time for execution but I feel the time it takes is too much.
The actual call to DB completes in ...
0
votes
0answers
83 views
Apache HttpClient for Web Application
I am trying to create a web application which will consume a lot of other RESTful apis. I am using Apache Http Components for consuming the apis.
The plan is to have a Singleton class which will ...
2
votes
0answers
568 views
REST Web API Claims / Identity 'refresh' per request
I intend to expose a ASP.Net REST API for a project. I would like to use the default ASP.Net Identity system to provide the SQL backend. Users are managed in a different project. For my REST API ...
3
votes
0answers
65 views
Web API 2 Controller for third party services for multiple organizations
I'm putting together some RESTful services using ASP.NET Web API. This is the first time I have done this, so I'm looking for general feedback on this controller to make sure I'm not doing anything ...
0
votes
1answer
86 views
Using basic REST API in Angular 1.x
I have built real-time markdown editor in order to learn AngularJS by practice. I think what I'm trying to do can be done a better way. Any suggestions appreciated. Here's my code:
...
4
votes
1answer
52 views
Extracting various URL parameters in Rest Service and then passing it to Builder class
I have a service which takes a lot of key value parameters in a URL. Only a few are mandatory and others are optional. It's up to the customer whether they want to set those optional parameters or not....
1
vote
0answers
630 views
Reusable REST service class for Angular2 in TypeScript
I am creating an Angular 2 web application using TypeScript. This application performs REST requests to a REST "service". For each REST resource in my service I create a separate "Service" class in ...
3
votes
1answer
137 views
Using Wreq and Lens libraries to query Prosper for account info
I am trying to create a program to manage my Prosper investments for me as an intro to Haskell project. I created a post a few weeks ago for some of the simpler backend calculations: Recommend Next ...
5
votes
2answers
100 views
Single class which holds response and error message
I am working on a library which will make HTTP call to my rest service basis on inputs passed to this library. And whatever response comes back from service whether it is successful response or ...
1
vote
0answers
244 views
Mobile app backend using Gin and Gorm ORM
I'm developing backend for my mobile app by using gin-gonic and gorm ORM (mysql). But I'm not sure api and db handle huge amount requests if clients increased. for example I'm using my db struct as ...
1
vote
0answers
2k views
JWT - Simple API example
I have created this fake API just because I want to learn how to use JWT. It is a simple unsigned token exchange with two methods call: login and adminPassword.
I've used https://github.com/lcobucci/...
0
votes
1answer
112 views
Client for many similar kinds of REST requests
I have a class that makes calls to a Web API (Using RestSharp), which works fine but the code is super ugly. What would be the best way to refactor it? I thought of just doing a Facade pattern so all ...
2
votes
0answers
320 views
REST service API using Python Bottle
I am working on a sample REST service to study testing related aspects using the Python Bottle framework. I read a lot about REST but I do not have a lot of practical experience designing RESTful APIs ...
3
votes
0answers
107 views
REST proxy in Meteor
I built a simple proxy using Meteor and its Iron Router. It currently fails at passing through other than 200 or 500 status codes, which i guess suffices. Is this ...
1
vote
1answer
1k views
A more optimized / cleaner way of validating WCF input parameter using IParameterInspector
I'm having a WCF Rest service which does input parameter validation by using the IParameterInspector, before calling the actual service method. I have Implemented ...
2
votes
1answer
124 views
Simple and reusable system for user registration and tracking and auto-updates
I created a bunch of small and mostly internal WPF applications for my company - usually for some file manipulation etc. For these programs, I would like to start collecting user info - who uses them, ...
5
votes
2answers
491 views
Restful API Building: Dependency injection + factory patterns
I am learning OOP. I feel I have a grasp of basic dependency injection in that as a rule of thumb, you pass an object to a method rather than the parameters to create an object. As such, never create ...
7
votes
2answers
2k views
Registration, login and logout in a Grails application
I'm completely new to Groovy, but have many years of Java experience, and recently I have started working on a Grails application, currently it contains the following:
User and Person domain classes
...
2
votes
1answer
63 views
Collection of $_POST data
I have a backend API that I'm sure can a refactor, but I'm not exactly sure how to avoid repetition between the store method and the ...
5
votes
1answer
156 views
JavaScript API for REST
[update: keeping this around for posterity, but we ultimately went to a pub/sub pattern, using Amplify.js. Amplify isn't strictly necessary to implement pub/sub, but it has some nice features and ...