Category "rest"

Custom API and cunsuming in php?

I want to write Web services(REST) and Consuming using Curl in php. $books = array( "java"=>"222", "php"=>"333", "c"=>"111",

Django Rest Framework Postman Token Authentication

I am using Django Rest Framework Token authentication and if i do curl http://localhost:8000/api/v1/users/?format=json -H 'Authorization: Token 0a813fdcd3f8846d

JAX-RS jersey ExceptionMapper: How to know the method who threw the exception

Im using JAX-RS jersey ExceptionMapper, and I'm wondering if there is a way to know inside the method toResponse(), which method (from the API) threw the except

Spring Webclient block() method executing forever not returning value

I am working on oauth implementation, by following the https://developer.okta.com/blog/2021/05/05/client-credentials-spring-security It's a test client, I am ge

Example of DocuSign REST API EnvelopeAttachment: update?

Could someone please supply an example of the use of the DocuSign REST API EnvelopeAttachment: update request (PUT /restapi/v2.1/accounts/{accountId}/envelopes/

Django Rest Framework - prevent access to API?

I'm using Django Rest Framework and Token Authentication. Everything works great so far. http://www.django-rest-framework.org/api-guide/authentication#tokenaut

Azure DevOps: How to create a folder in GIT repo with REST API repo

I want to create a folder hierarchy in a GIT repository on Azure Devops using the REST API. (automated via a script) The docs https://docs.microsoft.com/en-us/r

How REST API handle continuous data update

I have REST backend api, and front end will call api to get data. I was wondering how REST api handles continuous data update, for example, in jenkins, we wil

How to get parameters from path in Bottle?

When i execute this url: http://domain:8081/forum?id=2&page=26 with this code: @route('/forum') def display_forum(): forum_id = request.query.id p

How to form protobuf resource part of http request body and test it through dhc client or postman for restful services

I have created a .proto message and I'm exposing a rest service which looks like this @Path("/test") public interface test{ @POST @Produces("application/x-pr

Pass extra arguments to Serializer Class in Django Rest Framework

I want to pass some arguments to DRF Serializer class from Viewset, so for I have tried this: class OneZeroSerializer(rest_serializer.ModelSerializer): de

Reducing authentication calls on external API (Laravel 5.6)

My app requires data to be gathered from an external API. I am using Guzzle. My API methods are written into a separate class stored in a library folder. I ha

How can I make Laravel return a custom error for a JSON REST API

I'm developing some kind of RESTful API. When some error occurs, I throw an App::abort($code, $message) error. The problem is: I want him to throw a json form

Setting Up Postman for API Testing When Using Passport Authorization

I am a bit confused while trying to get Postman to work when testing the API of my application. Namely, I am using Passport authentication; however, I do not kn

Getting closed caption data files from YouTube V3 API (in Delphi)

When you upload a video to YouTube, it automatically transcribes it and creates three different CC (closed-caption) files. They can be downloaded via the YT Cre

How do we implement q Params in Helidon SE

I am new to Helidon SE and would like to know if there is a way to implement q params in REST service created via Helidon SE. Any help in this regard is truly a

Resolving Pageable in Webflux

I spent a lot of time to find a solution about Pageable in Webflux, unfortunately, at the time of writing this, Webflux does not support Pageable so I came up w

"SyntaxError: Unexpected token < in JSON at position 0"

In a React app component which handles Facebook-like content feeds, I am running into an error: Feed.js:94 undefined "parsererror" "SyntaxError: Unexpected

GuzzleHttp Hangs When Using Localhost

Here is a simple code snipplet but this just hangs and unresponsive. $httpClient = new GuzzleHttp\Client(); // version 6.x $headers = ['X-API-KEY' =&g

ElasticSearch Access-Control-Allow-Headers header is not present

I am making a POST request from a local https server to an ElasticSearch endpoint which has been configured as follows http.cors.enabled: true http.cors.allow-