Questions tagged [rest]

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-known SOAP (Simple Object Access Protocol) approach.

Filter by
Sorted by
Tagged with
2
votes
1answer
66 views

REST-API 3rd party resource model class

I'm working on an integration for Magento 2 with a 3rd party. This class will fetch the articledata resource. This resource contains multiple items, with a maximum of 750 per call. The class is ...
1
vote
2answers
269 views

Spring Mvc RESTful app with MySQL

I recently write a Spring MVC RESTful app and this is the REST controller that I have worked on. I haven't work with Spring RESTful for a while and hence, provided, the code for suggestions of how to ...
1
vote
1answer
9k views

Ajax call with Spring MVC Controller

I have been woring on AJAX and JQuery site. Here is my simple implemtation. i am looking forward to getting your reviews for any improvement/replacement for code mentioned below. Brief explanation: ...
1
vote
0answers
79 views

JavaScript client using a REST API to edit a playlist

I wrote some Javascript code today to interface with a restful Rails app which I thought was rather awkward & took me far too long to write. ...
3
votes
2answers
161 views

REST API for user access using ASP.NET Core

I have been coding in java for more than 3 years. Recently we had to develop REST Web Services for our customers in ASP.NET Core. I am a newbie to both C# and ASP.NET Core stack. The expectation ...
1
vote
0answers
32 views

Efficient backend for finding nearby properties

I am thinking of building an app based on location for finding nearby properties around 15 km from the location of the user. I am a beginner in Django and for such use case I could code the following ...
6
votes
1answer
7k views

MVC structured REST API in PHP

This approach might be wrong or right, if you have something to add please correct me since i want to learn! The past few weeks I'v been trying to build a MVC structure REST API in PHP.And this is my ...
3
votes
1answer
1k views

Django REST Framework - PDF Generator

I created a new endpoint for an API (Django REST Framework) that generates a PDF from an HTML template. I follow the example from the plugin django-easy-pdf. It's working, but I would like to improve ...
2
votes
1answer
2k views

PHP MVC RESTful API

I'm new to the whole thing of MVC patterns. Although I have heard of it before, I have never used it, so I'm confused with it all. I know that this code is not right probably but I need some guidance. ...
6
votes
1answer
1k views

Django Rest Framework Totaling API values in different ways

I am working on a stats website for my softball teams that I manage/play for. Here is my current Stat model: ...
1
vote
1answer
223 views

Polling an API endpoint with timeout using channels

I have written a simple API client for my app in Go. The client is very simple, it wraps http.Client and has some convenience methods. The one method I am trying to get some feedback on, does ...
6
votes
3answers
2k views

REST API to list books, where null means “everything”

My company has a REST API, and one design issue that has come up a few times is that we use null to indicate "get everything". For example /api/books?genre=romance ...
0
votes
2answers
63 views

Achieve error differentiation in Promises

Background I have a REST API using MongoDB, Node.js and Express that makes a request to my NoSQL DB and depending on different results, I want to differentiate which error I send the customer. ...
1
vote
0answers
739 views

Python - Flask Middleware - Request Session Management Strategy

I am trying to determine what the most appropriate strategy for session management and authentication is for a middleware application which acts to receive a request, send it over to a database, and ...
1
vote
0answers
144 views

Generating Resource URLs in Multi-Layered Web API 2 Project

I am building a RESTful Api service in .NET. I have a requirement where I need to include resource URLs as part of JSON data returned from the endpoints of my API. The solution currently has the ...
6
votes
2answers
14k views

Spring Boot RESTful service

I have developed this restful service using spring boot. Please look at the code if there is something to change to be more consistently. Resource ...
3
votes
1answer
140 views

REST API client

I am new in iOS development and Swift. I am going to develop a simple application which communicates with external REST services. This is my first experiment. I appreciate feedback on best ...
0
votes
1answer
61 views

Translating method calls to REST calls

I understand and apply the DRY principle but I have a hard time getting this DRYer than it is right now. ...
3
votes
0answers
124 views

Curl-based REST Client Library (round 3)

This code review request relates to this code review which covers the basic single REST call use case in this this REST client library. This code review covers the classes and unit tests for the ...
2
votes
0answers
93 views

Curl-based REST client library (round 2)

This is a second iteration on an earlier review - cURL based REST client library I have done some refactoring to split out the REST HTTP response into it's own class from what was in the previous ...
3
votes
2answers
701 views

cURL based REST client library

I have recently refactored a REST client library and was hoping to get review for both the class itself and the unit tests that cover it. This code is developed against PHP 7.1, but tested against ...
7
votes
1answer
6k views

Elegantly handle github API requests exceptions

I have this code which creates a team using the github API and returns the team-id(success) or -1(failure). My problem is with the error handling. When the request responses with an error status code ...
3
votes
2answers
3k views

Pass Through Web API calls

Our application architecture consists of: SPA JavaScript calls a set of Web API endpoints The Controllers then call an Entity specific Service Entity specific Service calls a Pass Through Service ...
1
vote
1answer
330 views

Spring MVC, Mongodb and java

I am avery beginner at SPring MVC, Mongodb and java. I am trying to make a sample application so that the user can serach, create, update and delete a customer: My CustomerDAO class: ...
4
votes
1answer
1k views

REST API that allows creating/removing users, CRUD ToDo tasks

My project is supposed to be used as back-end for a simple to-do web app that lets you create an account, add, edit, complete, and delete todos. It could be used with some front end consumer like ...
2
votes
1answer
3k views

RESTful HTTP Post with falcon

I wrote a small aggregator app that aggregates values from a json http post request and outputs the aggregated values. Now the aggregator function is somewhat large but the output appears correct. I ...
2
votes
1answer
375 views

Haskell REST API + PostgreSQL

I'm making some small REST API, which I have never done before. I've got some basic stuff working. Now my job is to add new entities to this, but all my work is reduced to copy-pasting code I have ...
5
votes
2answers
852 views

RESTful APIs (Create, Read) with flask-restful

I wrote this simple API to be able to send logs from the client to MongoDB. Even though this works and fits my need, I would like to point out some concerns that I have regarding the following: Is ...
5
votes
1answer
345 views

Translating an inputted query to SQL

I'm working on a small RestApi that would be able to: Interpret different query languages like ...
0
votes
1answer
68 views

Cucumber scenario to test REST interface to scuba diving logbooks

I am looking for ideas how to improve this cucumber scenario (testing a REST interface) and make it more concise. ...
11
votes
1answer
1k views

Bitex - Cryptocurrency Exchange API Framework for Python - Round 2

This is a follow up to my previous review request. BitEx is a Python module I've been working on for a little over 9 months now, as a side project. It was published 6 months ago on GitHub, and as I ...
6
votes
2answers
974 views

Python REST API clients

I am working on a project right now, where we need to search different APIs, then clean & persists data to database and finally pushing to Elasticsearch. The high level code looks like this: <...
8
votes
1answer
659 views

Bitex - Cryptocurrency Exchange API Framework for Python

BitEx is a Python module I've been working on for a little over 9 months now, as a side project. It was published 6 months ago on GitHub, and as I edge closer to my 1.0 release, I wanted to take the ...
1
vote
0answers
3k views

Simple REST-API using Python with falcon

I have a basic example of a REST API that I've done to control LEDs. I've read Dr. Dobbs article about REST and how to do it but I feel that my example doesn't look professional for some reason. ...
4
votes
2answers
340 views

Python Stock Checker

...
4
votes
2answers
279 views

Java REST-assured acceptance tests

I've have experience in unit testing but I'm fairly new to acceptance testing and REST-assured. I would like to get some feedback on my style. This is not a complete list of all my test but a few that ...
6
votes
1answer
621 views

Library to be used against a specific REST web service

I have been trying to generate a basic library that I can use at work, to call different REST calls towards a software vendor that we are using. I would love someone's opinion on it, and what I could ...
1
vote
0answers
63 views

REST request using reactive programming

The following code is an extract of a small library I wrote. Full code is available here. My question is about the following function. I added comments on each state. I'm wondering if I could do ...
1
vote
0answers
316 views

Extend the Laravel Eloquent model in order to easier implement CRUD REST for my routes

By extending the Model and using this inside my routefiles, I can easily call these functions inside the corresponding HTTP ...
4
votes
1answer
58 views

GET event handler

I'm working on my first NodeJS / Express application with the async module. It's been an uphill battle for me learning node (and even JavaScript) as I go along so I'm sure there's a lot of room for ...
3
votes
0answers
193 views

Simple picture app for storing and viewing

Update: git repo: https://github.com/muhsinali/picture-example-minified This is my first project that I've written using Scala and the Play framework. It's a simple application that allows the user ...
1
vote
1answer
516 views

DAO for fetching organizations and departments through a REST API

I have the following class structure: ...
2
votes
0answers
116 views

JavaScript Node/React web developer interview code part 2 RESTful API

I recently applied for a job as a Node/React developer. I'm attempting to cross over from a research position to web development. I didn't get the job but all the feedback I got was that my code was ...
0
votes
1answer
179 views

Java client that consumes a RESTful web service created using Jersey 2

I'm learning web services using Java. I just don't know which method has what advantage over another, like which one is more secure? Which one will be more faster? POST resource is as follows: ...
1
vote
1answer
430 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
107 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: ...
2
votes
2answers
392 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 ...
7
votes
1answer
2k 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.: ...
1
vote
1answer
1k 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 ...
5
votes
2answers
6k 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 ...