Questions tagged [web-services]
A "web service" is a software system designed to support interoperable machine-to-machine interaction over the World Wide Web.
96
questions
5
votes
2
answers
335
views
Tiny Network Web Framework / Library in C++
I recently wrote a tiny network library in C++17 called Turtle on Linux and wish to seek some improvement advice on how to further develop it. Any insights would be appreciated.
Origin: As a student, ...
2
votes
1
answer
122
views
Program for creating custom directory listings
The following code was written to create custom directory listings for the Abyss Web Server. It attempts to provide an improved example of the included documentation for doing so in Python. However, ...
4
votes
2
answers
65
views
Flask static url view
The code runs fine and was manageable without any error handling.
Once I started to handle errors and build out the code the if/elif/else branches quickly became too much. How can I route the view ...
1
vote
0
answers
22
views
processing webhook request coming from a 3rd party application
I need some help to evaluate whether I am doing it right. The scenario is, a 3rd party application is sending a webhook request after a successful payment but the problem is that sometimes this ...
0
votes
1
answer
2k
views
Retrieve filename and ID with Google Drive API in C#
I am trying to retrieve filename and ID list with Google Drive API (the latest Drive API version v3 is used here) as a first step in order to analyze and manipulate these files on Google Drive. The ...
2
votes
2
answers
293
views
Getting metadata from MusicBrainz service
I've written a program which does the following things:
calls third-party utility to get mp3 file fingerprint
asks MusicBrainz IDs from AcoustID service
asks metadata from MusicBrainz for each ID
I'...
8
votes
2
answers
600
views
Microservice that fetches data from REST repository endpoints on Github
I have code in Python 3 where I fetch data from the GitHub API, and I want some advice on the architecture of this code.
...
0
votes
1
answer
127
views
Microservice in Springboot
I wrote two microservices in Springboot and tried to follow the best practices. I would appreciate any suggestions about any improvement that I can make on the whole codebase. What are the parts of ...
2
votes
1
answer
69
views
A program designed to update fields in Service Now depending on type
This is my first attempt at using asyncio, I don't believe I am using it properly and would like assistance using it to maximize efficiency. The current run time is between 20-22 seconds. I would like ...
1
vote
0
answers
105
views
Clean way of passing parameters in swift
I am creating a user request model to pass-params for web service call
toRegisterParams() is used call register web service request
toLoginParams() is used call register web service request
so my ...
3
votes
1
answer
69
views
Callback usage with custom Stack Exchange Flair
Today I decided to continue refining my JavaScript skills and utilized the Stack Exchange API (v2.2) to write a "user flair" replica.
In case you don't know what the flair that SE provides is:
The ...
2
votes
0
answers
99
views
CSRF script in Php
A short script to make a CSRF token to be used in my html elements such as inputs, file-uploads, scripts, iframes & svgs.
...
1
vote
0
answers
1k
views
Golang and Gin framework: best practices to connect to Postgresql
I come from this question.
Project
A very simple project with Gin framework with an endpoint to return a list of users based on their score.
Structure
...
3
votes
1
answer
93
views
Most efficient way to check if user is allowed to update an object
So I have an user which can create his own Locations.
I implemented a webservice in order to add and update locations. If the user is not the owner of the location i want to throw an appropriate ...
1
vote
1
answer
1k
views
Properly disposing of a WCF connection using IDisposable
This is a follow up question to this question:
https://stackoverflow.com/questions/4573526/what-could-be-causing-a-cannot-access-a-disposed-object-error-in-wcf
I have created a WCF service and it is ...
3
votes
0
answers
49
views
Simple REST Base Web Server with Unit Tests
I am building out a simple web server in Go. My goal is to expand on this framework in a different application I am building.
Here is my github repo
https://github.com/jmacnc/gowebserver
Is what I ...
2
votes
1
answer
280
views
Gin framework project with an endpoint to return a list of users based on their score
My relevant work experience is with Java (mostly web development with Dropwizard/Spring) so I can not avoid using the same practices as I do in a Java project. The project is there but I am going to ...
4
votes
1
answer
492
views
Decorate a python function to work as a Google Cloud Function
I wrote this for a class project, the backend for this dog voting website. I noticed duplicate code among multiple functions I was writing to be deployed as a cloud function: they all were wrapped in ...
3
votes
1
answer
119
views
Java Messenger data transmission
This is a very simple concern, could somebody take a look at a few lines of my code? I'm writing a simple Java multi-user messenger, it is structured in a desktop client with a Swing GUI, a java ...
7
votes
2
answers
687
views
Network Interface Object
I wrote a Network... thing (not really telnet); and it's pretty simple. No options, just straight I/O. It seems programs get so bloated easily.
...
3
votes
1
answer
83
views
Web application response message API
The following excerpt is part of a web application microservice framework.
The goal of the provided module is to define a base class Message that may be configured ...
4
votes
1
answer
1k
views
Find currency exchange rates
Description:
Design a service to fetch exchange rate from a remote resource and
then calculate the exchange rate for each currency pair.
The remote resource contains the exchange rates of ...
2
votes
0
answers
137
views
Determine the country by an IP
EDIT: I have updated the code, if you have comments about the previous version of the code, please do post them anyway.
The task is to determine the country by an IP.
Provided programme queries two ...
2
votes
1
answer
1k
views
Web Service that gets data from multiple tables in a database using EF Core Database-First approach
I have never created a web service before. I followed most of this Pluralsight tutorial to give me an idea of how to create one using ASP.NET MVC along with .NET Core 2.0 and Entity Framework Core.
...
4
votes
1
answer
517
views
User registration - Controller, service and repository layers in Spring framework
I'm writting a registration feature currently and I I'm confused how to divide logic between layers. Can you review this code and tell if it's good way to do? In try-catch block I publish event to ...
1
vote
1
answer
8k
views
Parsing SOAP messages from a web service
I'm consuming an ASMX service with SOAP messages. Since Xamarin doesn't support SOAP 1.2, I'm writing the Web requests manually. I'm sending a user/password to retrieve the user ID.
A successful ...
1
vote
1
answer
6k
views
Map DTOs and Models within the Service Layer due to a missing Business Layer
The following is the story of a UserCredentialsDto that arrived at one of my endpoints and how it finds its way through all the layers namely
REST Layer
Service ...
2
votes
3
answers
4k
views
Simple web service call with retries
This code is actually pretty basic. Basically, I'm doing a large number of web calls. I currently do up to 3 Web Service calls simultaneously, one of which is below.
There were 3 errors I saw in ...
0
votes
1
answer
115
views
Pool of two objects for a web service
I am creating a web service that uses a component I've licensed that is restricted to two concurrent instances at any one time. Creating a new instance of the component takes a long time (seconds) so ...
1
vote
1
answer
140
views
Refresh webpage on change in folder
I want to refresh my web page every time a file is uploaded to the folder.
I have a web service written in flask having the following handler
...
1
vote
0
answers
1k
views
Asset management system
I'm relatively new to developing and I'm mostly self taught so a lot of what I know simply comes from googling & figuring things out from there!
That being said I've put together an ASP MVC ...
3
votes
1
answer
217
views
Python CGI front-end for web service to perform machine translation
I am trying to optimize this python script that is used to process web requests for machine translation. The actual translation executable that is called is quite fast. Also, the perl scripts that are ...
4
votes
1
answer
873
views
Android "ServiceListener" class for listening web services
I'm new in Android, Java and the whole object-oriented programming, I'm trying to develop an app which needs to listen on many web services (PHP scripts written by me returning a standardized JSON ...
2
votes
1
answer
9k
views
Implementation of a singleton HttpClient with generic methods
I need advice for this implementation that I made for a service access portable class library referenced to Xamarin.Android and Xamarin.Ios projects. For now, it works fine, but I have doubts about ...
2
votes
0
answers
4k
views
Simple API testing framework for testing of SOAP xml requests
I have a need to try to automate the testing of a large Web Service with an XML API interface. The framework takes the form of a Mavenised Java project.
The usual maxims apply: must be highly ...
3
votes
1
answer
501
views
Decoding and encoding JSON for a PHP service
I am writing a PHP service which will listen for JSON requests (made using jQuery) and will return the JSON responses.
The whole template for such services (there will be 5) I have shortened into ...
4
votes
1
answer
83
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 ...
1
vote
1
answer
313
views
WCF data service class
I have this WCF data service class and I believe it is doing a lot:
...
3
votes
1
answer
77
views
Brightness Web Server
This is the first real program I've written in Go so have at it! I wrote it because I use a tiling window manager that doesn't have any brightness control functionality (at least not that I know of).
...
1
vote
0
answers
403
views
Run a potentially long running application from within a Python webserver and return different results depending on whether the application finishes
I want an API on a Flask/Gunicorn webserver to make a call to a separate, potentially long-running java application. If the java application finishes before the Gunicorn timeout, Flask should return ...
2
votes
3
answers
194
views
Automating New User Creation With C# Web Service
I created a web service which can be called from a form to add new users to the system. The final service will add users to Active Directory and Exchange in the required format (please note that ...
0
votes
1
answer
1k
views
Accessing SharePoint's Managed Metadata TermSets Locally and Remotely
I have written a small program which has 2 main classes :
ServerSideMMS: This can access the SharePoint Managed Metadata Services, but only from the server which ...
3
votes
0
answers
2k
views
Serving images from a Raspberry Pi camera over HTTP
I have a Pi with a camera module that I control with Python.
I created a web server with web.py that allows me to make HTTP requests to the PI to retrieve an image. There are two optional parameters ...
3
votes
2
answers
327
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 ...
4
votes
1
answer
238
views
Script to periodically Identify and act on public IP address
This script checks what the current public IP address is. The plan is for this to run every 5 minutes or so, and then change some host file configuration depending on whether we the IP is identified ...
2
votes
0
answers
65
views
Signing timestamped API queries
The following code should prove to offer sufficient security for public API so my main concern is about design flaws in process. It is meant to describe the process and eventually get included in ...
8
votes
1
answer
7k
views
Simple Multi-Threaded Web Server
Need a way to test a web crawler.
Threw together this web server that will replay previously saved pages from a real web server.
Headers
...
5
votes
1
answer
4k
views
Uploading data to Google Drive
I have created a project which uploads data from my local storage to my Google Drive account using the Google Drive API.
You can read about how to run it on its Github repository.
The main script <...
0
votes
2
answers
260
views
Command line google searching
I have a bash script that is meant to start a google search from the command line. I am also looking to implement a way of getting source code for the search page possibly through a subscript. This is ...
2
votes
0
answers
826
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 ...