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
28 votes
1 answer
7k views

Fluent LinkedIn REST API client interface design

There is a handful of LinkedIn clients written in C# on the NuGet package library, but as far as I can tell, most only do authentication via LinkedIn. I found a couple which offer a LinkedIn REST API ...
danludwig's user avatar
  • 411
12 votes
2 answers
2k views

Simple AngularJS controller for REST API

We record software builds from our build machine into a database and for practice purposes I'm building a little web dashboard for it. The API is REST (WebApi) and provides access to query for ...
ChrisWue's user avatar
  • 20.3k
11 votes
1 answer
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 ...
deepbrook's user avatar
  • 227
11 votes
0 answers
2k 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. ...
Adarsh's user avatar
  • 249
8 votes
1 answer
202 views

A PHP API which has an endpoint for processing a user's facebook login details

I'm working on a PHP API for my angular JS Phonegap application. At the moment I'm focusing on working with a user's facebook public profile data. I'll explain the process a little first: The user ...
Sarah's user avatar
  • 401
8 votes
2 answers
4k 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 ...
skiwi's user avatar
  • 10.6k
8 votes
1 answer
695 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 ...
deepbrook's user avatar
  • 227
8 votes
1 answer
795 views

TDD tests for every view and its permissions in a REST API

I am currently developing a Django Rest Framework API with TDD. I have 15 tests and counting for two views, which doesn't seem right to me. It takes me a lot of time to write the tests and a lot of ...
 DJN's user avatar
  • 81
7 votes
3 answers
5k views

Executing a URL using RestTemplate

I am working on a project in which I construct a URL with a valid hostname (but not a blocked hostname) and then execute that URL using RestTemplate from my main ...
arsenal's user avatar
  • 2,167
7 votes
2 answers
1k views

Lock for preventing concurrent access in client data

I am trying to implement lock by which I don't want to have reads from happening whenever I am doing a write. Here is my ClientData class in which I am using ...
arsenal's user avatar
  • 2,167
7 votes
3 answers
2k views

Unit testing a REST API in Go

I am learning Go by writing a simple CRUD REST API using gotilla/mux and Gorm. I would like to get some feedback on the application code and on unit tests in particular. Please suggest me what to ...
Sasha Shpota's user avatar
7 votes
1 answer
226 views

Build a set of REST interfaces using Symfony framework

I have got a technical challenge from a company but they reject my code and I'm not sure how to do this challenge in a more efficient way so I'm here to get some guidance. The Technical challenge was:...
Muhammad Shahzad's user avatar
7 votes
2 answers
2k views

Extendable REST-Client

I've been working on a REST-client. The client itself provides only very basic and generic functionality. Everything else is done with extensions. Its raw usage does not need to be convenient but ...
t3chb0t's user avatar
  • 44.1k
7 votes
3 answers
25k views

Using RestTemplate with HttpComponentsClientHttpRequestFactory in a multithreaded environment

I am working on a project in which I need to make an HTTP URL call to my server, running RESTful service, which returns the response as a JSON String. I am using <...
arsenal's user avatar
  • 2,167
7 votes
1 answer
216 views

Small console app to execute some remote scripts

I'm learning F# and functional programming, from a background in C# and imperative/OOP. I've ported a small, one-off console app from C# to F#. The port worked (the app behaves the same way), but I'd ...
NWard's user avatar
  • 211
7 votes
1 answer
7k 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 ...
Ken's user avatar
  • 171
7 votes
1 answer
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.: ...
Dmitry Nogin's user avatar
  • 6,123
7 votes
1 answer
11k 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 ...
DaAmidza's user avatar
  • 249
6 votes
3 answers
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 ...
Peter's user avatar
  • 63
6 votes
3 answers
20k views

ASP.NET REST controller with try-catch error handling

Yesterday someone guided me through this article and I'm wondering whether I should use try-catch implementation or not? I have the following code below which is actually a RESTful service and I have ...
Sahil Sharma's user avatar
6 votes
3 answers
377 views

Generic method to call API functions with simple retrial on errors

I have to develop a small security management application that relies on a Web API. Based on that API, I have generated the REST client classes (Open API generator), but I still have to code on top to ...
Alexei's user avatar
  • 1,786
6 votes
2 answers
3k views

Star Wars API GET request in Python

I am working with a Star Wars API from http://swapi.co/api/. Here's the problem that I was working on for the Star Wars API problem. And the code works and prints out the exact output that I desired. ...
NinjaG's user avatar
  • 2,479
6 votes
3 answers
4k 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 ...
André Borie's user avatar
6 votes
2 answers
921 views

Python script to get and save data from a web API

I'm working as a system administrator (sort of), but learning Python on the side. Life gave me a chance to apply that knowledge, since our organization is being provided cloud email service, and it ...
Gavin Greenhorn's user avatar
6 votes
2 answers
15k 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 ...
cool's user avatar
  • 63
6 votes
2 answers
5k 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 ...
david's user avatar
  • 1,647
6 votes
2 answers
161 views

Controller for classrooms and students

The actions I'm wondering about are members, add_student, and remove_student. They work ...
Rob Sobers's user avatar
6 votes
2 answers
4k views

Speeding up Excel distance calculation using Bing API calls

I am writing VBA in Excel to calculate the distance between an employee's home address and work address using Bing Maps API calls. The process follows this general flow: 1) Convert the employee's ...
Lee Coffelt's user avatar
6 votes
1 answer
659 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 ...
Marius's user avatar
  • 187
6 votes
1 answer
186 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 ...
Mike Brant's user avatar
  • 9,588
6 votes
1 answer
1k views

Java secured cookie - security issues?

I tested the play framework the last days and had mixed feelings about it. In the end, I don't use play for my new REST project. I use http://www.sparkjava.com as minimal server setup. But I really ...
Roba's user avatar
  • 61
6 votes
1 answer
216 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 REST client library. This code review covers the classes and unit tests for the multiple ...
Mike Brant's user avatar
  • 9,588
6 votes
1 answer
189 views

User persistence and login flow

I have a Java project that copies files and folders to a user's space on the cloud service using a RESTful API. The login design is getting very complicated, and I wanted advice on how to simplify/re-...
jahmezz's user avatar
  • 163
6 votes
1 answer
2k 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: ...
Shak3nNotStur3d's user avatar
6 votes
2 answers
1k 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: <...
Alex benz's user avatar
  • 113
6 votes
2 answers
349 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 ...
Adamar's user avatar
  • 246
5 votes
2 answers
147 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 ...
Vhalad's user avatar
  • 91
5 votes
2 answers
848 views

HttpClient reusable instance for simple calls on another methods

I wrote a HttpClient instantiable class that will be used as reference to simplify API calls in other methods inside other classes, so the user could call it in a ...
Felipe Coelho's user avatar
5 votes
2 answers
8k 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 ...
user2859298's user avatar
5 votes
2 answers
357 views

Request dispatcher for PHP JSON web service

Below you can find the constructor method and related fields of the main class of my REST API (note that the class contains more code than displayed) written in PHP 7.1. It does various things with ...
Belle's user avatar
  • 207
5 votes
2 answers
12k views

REST API using PHP

I am trying to write an REST API using php from scratch which I am gonna use to play with Angular.js. It is working fine now and I need your opinions on the things I have done in this code to improve ...
Vignesh's user avatar
  • 383
5 votes
1 answer
277 views

Testable REST API Client

GitHub and NuGet Allows to invoke public/private REST API just by defining an interface. 200 lines of C# in total. Demo Sample API is publicly available at http://jsonplaceholder.typicode.com: <...
Dmitry Nogin's user avatar
  • 6,123
5 votes
2 answers
2k 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 ...
myol's user avatar
  • 157
5 votes
2 answers
8k views

Throttling REST requests in C#

I'm rather new to C#, and found relevant subclassing examples surprisingly hard to come by. I've whipped up this class that appears to work, but am pretty sure this is not optimal: ...
Cees Timmerman's user avatar
5 votes
2 answers
6k views

Rest API for realtime statistics of last 60 seconds

The following code is my solution to a code challenge I submitted a few weeks ago. I got rejected straight away with no feedback and I've wondering why. I'm interested in hearing if there is any ...
saralor's user avatar
  • 51
5 votes
2 answers
894 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 ...
ellaRT's user avatar
  • 253
5 votes
1 answer
912 views

Constructing a URL for execution using RestTemplate

I am working on a project in which I construct a URL with a valid hostname (but not a blocked hostname) and then execute that URL using RestTemplate from my main ...
arsenal's user avatar
  • 2,167
5 votes
2 answers
2k views

A generic REST API consuming Python library

I wrote this, which essentially acts as a single library for all possible REST services. Here is the main file, as of alpha version 1: ...
lprsd's user avatar
  • 181
5 votes
2 answers
7k views

External API calls from a C#.NET client

I have a simple c# mvc client that calls an external api..here is my attempt ...
nesh_s's user avatar
  • 153
5 votes
2 answers
138 views

Avoiding code repeating in RESTful APIS PHP

Since my last question related to this I have managed to create a working base and to understand how MVC works. I'm writing RESTful APIS in PHP, they serve the purpose but I see that my code is ...
DaAmidza's user avatar
  • 249

1
2 3 4 5 6