Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [web-services]

A "web service" is a software system designed to support interoperable machine-to-machine interaction over the World Wide Web.

Filter by
Sorted by
Tagged with
55 votes
2 answers
88k 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 ...
Konrad Viltersten's user avatar
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 ...
Neggly's user avatar
  • 535
18 votes
2 answers
88k 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 ...
ledgeJumper's user avatar
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 ...
RooMan's user avatar
  • 275
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. ...
E.Mohammed's user avatar
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 ...
Martin York's user avatar
  • 95.2k
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 ...
Sam Leach's user avatar
  • 295
7 votes
2 answers
689 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. ...
motoku's user avatar
  • 2,521
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 ...
user3284707's user avatar
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 ...
Richard Junestrand's user avatar
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 ...
prot's user avatar
  • 161
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 ...
Sebastian Wramba's user avatar
5 votes
2 answers
346 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, ...
I Love Turtle's user avatar
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 <...
Anmol Singh Jaggi's user avatar
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 ...
RUser4512's user avatar
  • 1,033
5 votes
1 answer
780 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 ...
Tobias Hermann's user avatar
4 votes
3 answers
456 views

Is this a good controller?

...
user2136883's user avatar
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 ...
Chris's user avatar
  • 185
4 votes
2 answers
446 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 ...
Superbest's user avatar
  • 413
4 votes
2 answers
977 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, ...
aaronmallen's user avatar
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: ...
bejumi's user avatar
  • 43
4 votes
1 answer
84 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 ...
roipoussiere's user avatar
4 votes
1 answer
249 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 ...
Bassie's user avatar
  • 559
4 votes
1 answer
540 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 ...
Julian Zucker's user avatar
4 votes
1 answer
286 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 ...
Josh Harrison's user avatar
4 votes
2 answers
69 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 ...
sat1017's user avatar
  • 141
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 ...
CodeYogi's user avatar
  • 5,107
4 votes
1 answer
522 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 ...
Aro400's user avatar
  • 43
4 votes
1 answer
877 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 ...
Cliff Burton's user avatar
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 ...
Khawar Raza's user avatar
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....
Revious's user avatar
  • 503
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. ...
Kian's user avatar
  • 133
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 ...
Hazel へいぜる's user avatar
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 ...
Himanshu Yadav's user avatar
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 ...
Mike Christensen's user avatar
3 votes
1 answer
95 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 ...
Savan Luffy's user avatar
3 votes
1 answer
220 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 ...
Steve3p0's user avatar
  • 151
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 ...
Trowa's user avatar
  • 131
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....
Daniel Newtown's user avatar
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 ...
Richard Neumann's user avatar
3 votes
1 answer
513 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 ...
Alex's user avatar
  • 173
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 ...
Rhys Hamilton's user avatar
3 votes
1 answer
343 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. ...
natenash203's user avatar
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 ...
LiavK's user avatar
  • 608
3 votes
1 answer
716 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 ...
user30345's user avatar
3 votes
0 answers
50 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 ...
jmacnc's user avatar
  • 31
3 votes
1 answer
121 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 ...
Constantin Müller's user avatar
3 votes
1 answer
78 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). ...
aidanharris's user avatar
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 ...
I'll add comments tomorrow's user avatar
3 votes
0 answers
764 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 ...
sivi's user avatar
  • 181