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
1 vote
0 answers
39 views

Merges two OKHTTP responses into one

The first request is sent asynchronously, then the id value is taken from the response to the first request and used in the second asynchronous request. And then both responses to request 1 and ...
user avatar
0 votes
0 answers
35 views

Simple project of Spring-RestController

I'm learning how to build a project from a scratch by using Spring Rest Controller but I need to get a feedback to learn from my mistakes or overengineering parts. This is my controller; ...
user avatar
0 votes
1 answer
75 views

Python API testing

I have written a rudimentary code in Python: That reads the API collection from Swagger/Postman and extracts the payload, link, and method It creates the response with the token(Generated from the ...
user avatar
  • 41
-1 votes
1 answer
75 views

Basic ASP.NET Core RESTful API with Entity Framework Core

This is my first WIP backend asp.net application, which I will pair with react to create a full stack app. The thing I'm mostly worried about is model conversion to DTO and custom policy authorization,...
user avatar
0 votes
0 answers
30 views

Highly versionable API

Environnement : Rails 6.1.4.1 db : PostgreSQL Hi everyone, I've been working on this for some hours now and want to know how other Rails developpers would react to this type of project structure. ...
user avatar
0 votes
0 answers
23 views

Possible to merge model method database calls?

I have an application using Django Rest Framework and a ListModelView for a model which I basically need to filter for in a MongoDB. The call for MongoDB is made in ...
user avatar
  • 165
1 vote
2 answers
79 views

Requiring query field to not be empty on search api

we have a RESTful API that includes an endpoint for search apiserver/v5/search?q=[search text] for any query, it passes it off to solr and returns the result like ...
user avatar
0 votes
2 answers
147 views

Python RESTClient Class with asyncio and aiohttp

I've seen Using asyncio and aiohttp in classes but could not really figure out how to apply this to my own code. The main idea of this code is to inherit from this RESTClient class whenever I build a ...
user avatar
2 votes
0 answers
34 views

Copy images using curl to make API calls

I am a junior web developer currently doing my first internship and I had a lot of freedom to solve small problems the way I thought was best. (There aren't really any developers here so I am ...
user avatar
  • 21
0 votes
2 answers
71 views

React Native screen to add a city to a weather app using a REST API

In a recruitment process, the company gives me a project to do in react native. I finished all the tasks. But company gave me a feedback and said that your project was good, but you did not apply best ...
user avatar
1 vote
1 answer
57 views

Wanted to eliminate the repetition in the classes created to reduce duplication

Can some one help me on how to eliminate repetition to reduce duplication score on the below classes created in the code ...
user avatar
1 vote
1 answer
909 views

Handling multiple optional parameters in Spring

I have an endpoint in my RestAPI which can receive 3 optional parameters and then find information in the database with these parameters, also it is possible to combine the parameters. So, in my ...
user avatar
  • 13
4 votes
0 answers
279 views

Simple RESTful counting API in Golang

Description This is a simple (and hopefully) RESTful API in Golang that uses Redis. I have next to no prior experience in Golang and absolutely no prior experience with Redis. The API is a simple ...
user avatar
4 votes
1 answer
60 views

Single end point REST API

I want to ask question about a better way for implementing single endpoint REST. I want to build a rest API but I want it to only have single endpoint like: graphql,...
user avatar
  • 143
3 votes
0 answers
93 views

Python REST API Data Extraction with requests library

Is there a better way to write this piece of code to extract data from a REST API with the requests library? It currently takes about 10 minutes to finish extracting the data from the REST API. I ...
user avatar
  • 31
1 vote
0 answers
487 views

Python Rest API user registration based on FastAPI framework

I have written an API for a dating service. This part is related to user authentification, authorization, login and etc. It uses FastAPI, which in turn is based on starlette web server. You may wonder ...
user avatar
3 votes
1 answer
145 views

Golang Rest API

I want to ask if there is a better way to arrange this. Main concern is whether the store is set up in a good way and if passing Pointer to ProductRepository is a good idea or there are better ways ...
user avatar
  • 131
2 votes
2 answers
227 views

API call return type and error handling [closed]

I wrote the following method which would just call an API which would then update a user's subscription to something. ...
user avatar
  • 123
1 vote
0 answers
57 views

Basic REST API in Ktor

I have written a basic REST endpoint in Ktor and would like some pointers. Application.kt ...
user avatar
  • 111
4 votes
1 answer
717 views

Historical Funding Rate Miner for ftx.com

I recently started to take a look at the Go programming language and decided to write a small project without practical use. The objectives were: Regularly poll the latest funding rates from https://...
user avatar
  • 389
4 votes
2 answers
75 views

Application to calculate scores of strings submitted to an endpoint

Recently submitted a code assessment and I was wondering what other's feedback might be. What red flags can you see? I included gradle file if you're interested in running the application locally. ...
user avatar
  • 41
2 votes
0 answers
529 views

mongodb RESTfull api in python using fastapi and mongoengine

So I wrote a a RESTfull api for a mongodb with python3.7, fastapi and mongoengine and id love to get feedback on how I should make my code more readable, clean, and dry. basically there are 4 main ...
user avatar
2 votes
1 answer
118 views

Stock data REST API extractor with GCP storage options

I'm currently working on an AI-driven trading system, the code below aims to extract ticker data from polygon REST API, this is a paid service so, in order to test the code you will need to subscribe /...
user avatar
2 votes
2 answers
152 views

Loan application service based on user credit score

The following microservice is just handling loan application and response the result of the application is accepted or rejected. It is part of my assignment for an interview. The project description ...
user avatar
  • 180
2 votes
1 answer
95 views

Is this nodejs web-application spaghetti code?

I recently interviewed for a backend developer role at a startup involved in financial products, as a 2020 grad. The take-home assignment they had me submit had a few basic goals and they recommended ...
user avatar
2 votes
1 answer
91 views

Using Node.js, Express, and Express Router to implement a very simple REST API

To learn the ropes of Node.js and Express, I'm trying to implement a very simple REST API. The API says what it should do instead of doing it, so I can focus on the framework's structure. The ...
user avatar
  • 729
1 vote
0 answers
22 views

User Friendly Comment and Answer System for SharePoint Site

I am seeking help in improving my question and answer system I developed for my office SharePoint site. The question and answer system features two-columns and in the each columns is a table. I have a ...
user avatar
  • 111
2 votes
1 answer
161 views

What is the common API endpoint architecture using DTO?

Hey I always used to create some pretty messy endpoints and I decided that it's about time to start writing cleaner code, I'll provide an example of how would I design an endpoint and I'll be ...
user avatar
  • 129
2 votes
1 answer
176 views

Reviewing the file download controller in spring rest

In my project, so this controller is working perfectly, my objective is to read the log file from the server which is created on daily basis, so I have to read the log file which is heavier in size ...
user avatar
  • 287
1 vote
2 answers
2k views

Return a 404 when a resource is not found in Spring Boot

I wrote this code in order to return a http status of not found to my users in case the resource is not present in the DB. ...
user avatar
  • 789
2 votes
1 answer
2k views

Spring, Kafka and Mongo how to create a RestController

I'm learning how to use Kafka, I've never used something similar in the past. In my job I was required to create a POC using it and integrate it to Spring Boot and save information on MongoDB (because ...
user avatar
  • 181
2 votes
1 answer
245 views

Simple REST web service

I am a young computer science student programming mainly in Java. I wrote a simple RESTful web service using Spring Boot Framework and the DDD architecture pattern. The project is a library ...
user avatar
1 vote
1 answer
64 views

Invoicing - calling multiple pages of Api and concatinating the results

I have the following code: It works completely as expected, but I feel there is a better way to refactor it out. The flow is as follows: Call the end point with 1 page Get the total number of ...
user avatar
  • 111
4 votes
1 answer
73 views

Script to push data from one database via api to another

I'm still a beginner so any pointers to make this code more professional/production ready are appreciated. The tokens and database connections have been anonymized. The script is working, its goal is ...
user avatar
  • 143
1 vote
3 answers
311 views

Spring boot application web service

It's a web application. It should provide a service for entering data. Data is then evaluated and uses itself another service. It was part of an interview process where I was given that task to solve....
user avatar
2 votes
0 answers
95 views

ANDROID - Receive and manage markers in Google Maps

Recently, I've received negative feedback of interview's test. They say that they need somebody with higher technical level, the quality of the task was not good enough. I upload it here, to request ...
user avatar
1 vote
1 answer
46 views

Symfony rest endpoint for get a number products of one user

I want to improve quality of this symfony rest endpoint (solid principle, Kiss, best practice...) Can you review my code please? Symfony controllController function that return json list of product <...
user avatar
  • 13
2 votes
1 answer
47 views

Backend for chore management app

This is my first go at Django, so I'm looking first to learn how to make this more idiomatic. Also, is there a better way to set up my tests? To my HTTP status codes make sense? chores/tests.py <...
user avatar
  • 1,132
3 votes
0 answers
1k views

C# Rest Client Benchmarking

I build a C# Rest Client library / framework. I noticed that it seemed to be significantly faster than RestSharp for GET at least. So, I decided to put together some benchmarks comparing it to other ...
user avatar
2 votes
1 answer
327 views

Golang REST API that CRUDS in-memory object

Hey everyone I have a very simple go REST API that is running CRUD operations on an in-memory object. I would love some feedback on how I can refactor this code, and how/if I should break this up into ...
user avatar
  • 173
1 vote
0 answers
1k views

Anything Wrong with This Method of API Versioning Using Flask?

I'm trying to find a sensible way to structure a REST API written in Flask. I'm new to writing such things and I've not seen this structure used anywhere else, so before I continue I wanted to ask ...
user avatar
3 votes
1 answer
432 views

C# REST / Http Client Abstraction

I have a REST library. These are the abstractions. Have I missed anything that a developer would need to use this in a dependency injection / IoC Container scenario? Anything that bothers you about ...
user avatar
3 votes
1 answer
111 views

Centralized REST API request dispatcher

Recently I had to implement a Windows Service that connects to the Shopify REST API and pulls essentially everything new into some SQL Server database, on a hourly basis; I've also implemented a small ...
user avatar
1 vote
3 answers
1k views

Code to pass json data with WCF REST POST

I have a WCF REST POST that has JSON data as input, IService.cs: ...
user avatar
5 votes
0 answers
327 views

what is the correct way to write an endpoint?

Here is a rather large endpoint that I have written in Python using Flask and SQLAlchemy, I was wondering if there are any tips I could get. The endpoint takes a post request which contains specific ...
user avatar
  • 173
-1 votes
1 answer
81 views

Accessing function of class A from RESTful API that runs in class B [closed]

I have the following code ...
user avatar
  • 129
2 votes
0 answers
79 views

Ecommerce site shipping data

I have REST API written on laravel and front end on vue.js. It is a dashboard for an ecommerce store where you can connect to post shipment service API to upload order shipment data and get tracking ...
user avatar
2 votes
0 answers
390 views

Web API get data with many optional parameter in .NET Core

I would like to do a refactoring of web API implemented in .NET Core. The Goal is to simplify ...
user avatar
5 votes
1 answer
214 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: <...
user avatar
  • 6,123
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 ...
user avatar

1
2 3 4 5 6