Newest rest Questions

Q&A for professional and enthusiast programmers

Where should I write JSon processing script - java or javascript

If this question is more appropriate for another forum please do point me to the same. I am writing a web application that would pull data in JSon format from a number of REST sources. The UI uses a ...

How to upload a file in Titanium

I have and app in Titanium and I'm using https://github.com/viezel/napp.alloy.adapter.restapi to handle my requests to the rest api, now I need to upload a file to the server. How can I manage that? ...

RESTful: How to dynamically extend path via interface

I have the following interfaces @Path("/v1") public interface IV1Api { } @Path("/Accounts/{AccountId}") public interface IAccountsInstanceApi extends IV1Api { } @Path("/Users") public interface ...

Docker for Windows REST API - enable CROSS

Right now I'm working on a small GUI for using docker. I'm using electron.js and Vue.js for this. Since desktop applications written in electron are embedded Chrome apps, I have a problem when I try ...

JSR 303 validation - how to print object before getting it validated by JSR 303

JSR 303 validation - how to print object before getting it validated by JSR 303. how to print an object which we are getting in rest ws controller before jsr validations took place. We have restfull ...

Java: Send GET PUT POST to an external API and get response

I am relatively new to JAVA and am trying to build a back-end application which will call another server where the data is present. I have to do GET, POST, PUT and PATCH(can live without PATCH) ...

Tool to proxy/convert existing GraphQL API to REST

We have an existing private GraphQL server that powers our React application and would like to possibly expose a subset of the functionality as REST endpoints. This way we do not have to support 2 ...

How to cancel a service rest (java jersey) at runtime? [on hold]

I have a rest service, which does a task that takes several minutes. The problem is that you need to have the possibility to cancel the service while it's running, I have tried to do it and I have ...

nifi invokehttp post complex json

I trying to use InvokeHttpProcessor in Apache NiFi to perform POST request with complex JSON body. Accordingly this tutorial: http://www.tomaszezula.com/2016/10/30/nifi-and-http-post-configuration I ...

Codewars API Unauthorised

I'm trying to use the Codewars API and would like for example to "Train next code challenge." as per instructions here: https://dev.codewars.com/#post-train-next-code-challenge Using curl "https://...

Web app in java needs to communicate with java desktop app what are my options? [on hold]

Hi I need my web app developed in java to communicate with a desktop app also developed in java. I have found many different options but do not know which is more optimal, I have found many outdated ...

API authentication with oAuth2 and first-party applictions

I apologize if this has been answered, but I have been searching for hours, and still don't quite understand. This is a specific question, and not a "which is best" question. Specific questions are ...

PNG file displayed as red question mark after download with HttpWebRequest

I face the following issue: I downloading a png file from google drive, all bytes are successfully received (as it seems), but when I try to construct a Texture2D and set it as Sprite in an Image, ...

Trouble setting the payment Id while using Paypal REST API to create payment

Hi I'm a newbie with PHP and Paypal, I'm trying to implement a express checkout using the Paypal REST API, first I generate the authentication token, and so far so good, then I create the payment and ...

How to split Laravel application to client app and REST service

I have been writing a Laravel application and I now want to split it into two applications: a client application and a REST service. I have implemented Passport and that's fine. I have created a ...

Sending optional parameters as empty in a web-service requestbody which do not have values

I am trying to consume some rest webservices with json request and response format. I am sending all the values in the request even the optional parameters which do not have values.(The default ...

Sending data messages without REST Api in Firebase

I was planning to send data messages (I do not mean notification messages!) to specific users via FCM. I tried the REST Api named ARC but since it is still in beta use it seems like there are still ...

Error in Angular $http.get method

I want to retrive the data using REST api response and display in my html page. Here is the code I have written so far. Can anyone help me in writing the correct code as I am new to use web services. ...

how to fix mistake in custom function REST API in AngularJS: Expected response to contain an object but got an array

I have a RESTful API . It gives me access to a MYSQL database, where I'm trying to get some data using custom function getScholarshipfindByField and using those JSON data i want to build a page using ...

Joining SQL Query data with Rest Service data on the fly

I need to merge data from a mssql server and rest service on the fly. I have been asked to not store the data permanently in the mssql database as it changes periodically (caching would be OK, I ...

Transferring finds out of bank account using java/android studio [on hold]

I have been searching around to see if there is a way to connect to a users bank account. Iv come across Plaid and Yodlee, but i was hoping to find banks that have some sort of api/rest service. Is ...

Django REST Framework: require login to view API

I am working through this series on the Django REST Framework and have a few videos left: https://www.youtube.com/playlist?list=PLEsfXFp6DpzTOcOVdZF-th7BS_GYGguAS Unless I missed it somehow, I haven'...

How to attach a jQuery ajax call in an anchor link built dynamically [duplicate]

I am using jQuery and Rest API (using Spring boot) to build a reporting module. I have one call to retrieve all saved reports from database and display them in an ordered list. $("#draftImg")....

Not getting response for boolean value using $resource of angular js and spring rest controller

Trying to send get boolean value from spring restcontroller using $resource service of angular js ,but getting nothing in response of $resource.get.Is there anythingextra i need to add on my client ...

Retrofit + Restful c# Upload Files

I got the files to send by Retrofit with Android using Multiparti however on my server I work with .Net C# to build the Restful Service, then How can i create the restful to receive the files ...

Invoke-RestMethod OutFile Empty When PassThru Used

Using PowerShell 4.0 and Invoke-RestMethod cmdlet. I'm having trouble with the -OutFile and -PassThru options. Whenever I add the -PassThru option, my -OutFile is created but the contents are Empty! ...

spring boot data - download Large Lob files from DB

I have written a spring boot web/rest application to handle a legacy system (DB tables), this application does the following: user create a bill request through a REST WS. My rest app store the ...

Transfer File from server to another using Rest Service

This is the structure I have: Server 1: Form to upload files and save them in internal folder. Server 2: Just a Repository with files. What I need: A user from Server 1 upload a file, then, I need ...

angular $resource with non-RESTful api

It has been quite a long time since I started using $resource in my angular application to consume a non-RESTful web API, and I didn't have any problem at all everything is working totally fine, my ...

Authentication - Passport JWT - Unauthorized

so there is an issue that I've been struggling with for two days : I'm trying to create a rest web service to create a new user identified by login/password and to do the authentication with JWT. The ...

Using Kafka in a resquest/response scenario inside a REST web service

I am currently building a REST web service that needs to communicate with Kafka in a request/response pattern. (I know that Kafka is not really designed for that). Client calls the REST web service. ...

Marketo REST API create through PHP form [on hold]

I am working on integrating Marketo into a custom form on a website. This is my first time doing such a thing so I appreciate all the help. I have a custom build PHP form to capture information that ...

Drupal 7 Services Api | Connect to local React native

[enter image description here][1]I've have Drupal 7 setup on the acquia desktop. I have services enables and have created an api. When I ping my api from a browser, the json shows up. When I try ...

How can my bot server know INSTANTLY when someone installed the bot using Add-to-slack button?

I use microsoft bot framework and a flask based bot server in my application. When someone installs the bot, the Botframework stores the JSON POSTed by slack, including data like SLACK_TEAM_ID, ...

JS Fetch to Spring > Required request body is missing

I'm currently trying to put(HTTP put) simple data to my Spring server however I can not get it to work via Javascript Fetch. It return following error: "status" : 400, "error" : "Bad Request", "...

Error with querying GeoPoints on Parse's Rest API using Alamofire in Swift

I am currently using the Parse REST api using Alamofire on iOS. I am trying to retrieve an object that has a GeoPoint associated with it and retrieve it's related data. I am constructing the ...

How implement a service that receives requests and distributes them in java?

i have to implement a service that receives requests and distributes them equitably to two instances of a second service processing the request (keep copies of the processing). Extra info: The ...

FOSRestBundle + FOSoAuthServer - access for specific roles only

I implemented REST API in Symfony 3 (using FOSRestBundle) and OAuth2 authorization for this API (using OauthServerBundle). I would like to limit access for specific role only (ROLE_API). I know that ...

How to configure middleware inside a .NET MVC 5 Web App?

I need to run a program that fetches info from a REST API every 10 seconds and then posts it to an Action in my MVC 5 Web App. So far, the best solution I've come up with is to run the Web App and ...

Rest API with Java socket Server

I would like to create an Android game and it would be a turn by turn game. To do that i wanted to a java Rest API for everything that concern the users (log/disconect account, change account settings,...

How to develop Rest service for handling long term jobs

I need to create a service which will handle long executing jobs. Currently I am trying to develop WebAPI REST service with, for example, endpoint "POST /api/start", which will return JobId. After ...

In android, I can't send information by using Rest to server

I tried to make LoginActivity in Android Studio. I can't add my code because I tried lots of REST libraries. My problem is, I can send my information to TestURI (ex. http://10.0.7.2:4000) but I can'...

java.net.ConnectException Connection timed out: connect

I'm working with a RESTFul api in Java EE7. I'm using a @Stateless EJB with a method that I can reach by a HTTP Post request. I am trying to validate a recaptcha code in the server side, so I need to ...

Angular http.post header issue

How do I send CSRF and Token data in a http request? I'm using Angular to post json data to a Drupal services endpoint but I'm experiencing problems. // drupal post node $scope.post_node = function(...

Linux nodejs rest service work only localhost

i'm developing a REST API with node js on linux. This my first sample code to try if all works fine: 'use strict'; var express = require("express"); var app = express(); var port = process.env.PORT ...

How to Use Power BI API from JavaScript

Can anyone provide an example of using the Power BI Api with JavaScript, that would work from a server (no interactive authentication)? The end goal is to periodically push data to PBI with no user ...

Extra slashes on json response

On database: { "email", "color" } But when I try to output it using application/json' => \yii\web\Response::FORMAT_JSON, the string contains extra slashes [ "Verify", "{ \"email\",...

Trouble getting Paypal in-context checkout.js v4 work with REST API

I'm new to Paypal and PHP, so maybe I'm doing (or not doing) something wrong, I'm trying to get a Paypal in-context checkout v4 to work using the server side, to be able to manipulate things when the ...

Different Browsers return different content type for ResponseEntity

I wrote a rest service using springboot and getting a response using ResponseEntity. The postman plugin returns the response in JSON, however same url request in google chrome returns the XML and ...

JSON response: Formatting the JSON response for one list item

I'm trying to print the fourth item in a JSON (being pulled from a REST API) response with one return line after the third item, but there are additional return lines between the third and fourth due ...
Translating... 0%