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
54
votes
2
answers
87k
views
Single instance of reusable HttpClient
I've got this method and I realize that an instance of HttpClass is going to be created for each call to it. While working seemingly OK, I'm considering moving it ...
38
votes
5
answers
2k
views
First Time HTML5/CSS Site
I am working on my first HTML5/CSS web site and, like all of my first-time projects, they end up cumbersome, crude, and hard to work with when changes need to be made later in the life cycle. I am ...
18
votes
2
answers
87k
views
Consuming an ASP.NET Web API call in an MVC controller
In a new project I am creating for my work, I am creating a fairly large ASP.NET web API. The API will be in a separate Visual Studio solution that also contains all of my business logic, database ...
14
votes
1
answer
21k
views
Data transfer objects vs Entities in JAVA REST server application
I am quite new in web application back-end development and I have an architectural question.
I have defined Hibernate entities in my application and I want to send ...
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.
...
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
...
8
votes
1
answer
4k
views
Web service proxy that switches endpoint URLs in the event of a TimeoutException
I am creating a service (FaultTolerantCommunication) that wraps a call to a (web) service. Its responsibility is to switch the endpoint URL in the event of a ...
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.
...
6
votes
2
answers
4k
views
Web service getting value using LINQ from queue table in SQL database
As a test of my C# skills, I have been asked to create a simple web service which will take a message from a queue table in a SQL database and send it to a web application when a button is pressed on ...
6
votes
1
answer
17k
views
Web API and Stored Procedures
I am building a web service that gets data via Stored Procedures from a db and provides the result as JSON. The solution is built as a MVC 4 Web API project. I have to retrieve the data via Stored ...
6
votes
1
answer
157
views
Proxy web service which handles three different input structures
I'm a newbie and I'm new to C# (thus statics and copy-paste) and I'm painfully aware that this code smells. I'm trying to implement a web service that handles a similar pass-through logic with three ...
6
votes
2
answers
484
views
Synchronization with remote web service
I am writing a method to synchronize the local Core Data entities with a remote web service (in this case, Parse.com).
To update changed or created objects, I fetch all where the ...
5
votes
2
answers
334
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, ...
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 <...
5
votes
1
answer
1k
views
Simple Python chat
I am working on a simple console chat in Python. I started from this Winforms application, removed all the forms (so that the chat could run on Windows and Linux) and did some refactoring (the "click ...
5
votes
1
answer
777
views
Small web service using scotty
I'm writing a small tool that allows to manually protocol dial-in-actions. That means a user can say he dials in to a site or he dials out of a site. (What this means is not important for the sake of ...
4
votes
3
answers
456
views
4
votes
2
answers
2k
views
Authentication for a Flask API
I've written a couple of functions to check if a consumer of the API should be authenticated to use it or not.
Have I done anything blatantly wrong here?
Config
...
4
votes
2
answers
430
views
FreeDNS update script
I tried to write a script which takes a list of URLs, checks if their FreeDNS record points to the current IP, and updates the record if not.
Intended use is that the script will be run periodically ...
4
votes
2
answers
966
views
Create User profile with separate social media data
I am creating user profile logic for a blogging platform. I have the UserProfile model and then two separate models, ...
4
votes
1
answer
23k
views
ASP.NET Web API HTTP GET with optional parameters
Writing my first ASP.NET Web API web service. Still learing the power of Linq as well. I feel like there is a more ideomatic way of doing this:
...
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 ...
4
votes
1
answer
237
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 ...
4
votes
1
answer
285
views
Graceful JavaScript fallback for external web service failure
I use the src.sencha.io service to resize images on the fly according to device width, saving lots of bandwidth on mobiles etc.
Sometimes the service fails randomly with a 503 error, so a fallback is ...
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 ...
4
votes
1
answer
490
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 ...
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 ...
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 ...
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 ...
3
votes
4
answers
11k
views
Android AsyncTask, HTTP Request and Parsing
I am working on Android applications for last 2 years and about 80% applications I have developed involve web-services consumption followed by some sort of XML or JSON parsing. Initially, when I had ...
3
votes
1
answer
3k
views
Call to external web service
The architecture is showing a call to an external Web Service which is called by me. Then I will expose the data using WCF to be callable from another WCF client. But I really don't like how it's done....
3
votes
1
answer
2k
views
Is this too long for a web request?
This is from a C# library I'm writing that checks for updates through a PHP script.
...
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 ...
3
votes
2
answers
48
views
REST service to list new, continuing, and terminated subscribers during some period
I have a use case which says:
Your REST service will consume a JSON object that contains a list of
emails for subscribers at the start of the subscription period, and a
list of subscribers at ...
3
votes
2
answers
3k
views
Implementing WCF method that supports either string or object as a method parameter
I have the following contract in a WCF-based web service:
public List<string> GetAllPossibleQueryEngineHostNames(Instance instance);
Obviously, I can call ...
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 ...
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 ...
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 ...
3
votes
1
answer
4k
views
Converting code for javax.xml.soap.* to webServiceTemplate
I am able to send requests to the web service using javax.xml.soap.*. I would like to convert the code to use webServiceTemplate....
3
votes
1
answer
82
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 ...
3
votes
1
answer
500
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 ...
3
votes
1
answer
153
views
Web Service implementation on the client
I will be creating a web service as part of a group project for university, which will be developed using Java within the Eclipse IDE.
Having no prior experience using web services, I managed to ...
3
votes
1
answer
342
views
Model Implementation That Calls RESTful API
I am working on a ground-up rebuild for an app that has a relatively simple purpose. Users can view/favorite entities that are backed by a RESTful API. I own both the client code as well as the API. ...
3
votes
1
answer
990
views
Small, embedded full-stack web server
I did this project last year, under some interesting constraints: it's a thin webserver which lives in a Raspberry Pi, which is networked to an embedded system in an industrial sign which is running a ...
3
votes
1
answer
715
views
Synchronization-Thread with Server every 5 secs
I have a server-client environment, where the client connects and synchronizes data with the server every 5 second.
For synchronizing I use a background thread on the client which works fine, but on ...
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 ...
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 ...
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).
...
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
0
answers
763
views
Web service for Android clients to store images
I wrote this code for Android server interaction. The way I built the client was an onSharePreference of strings includes photo encoded to a base64 ...