java – Consuming Multiple resources from a single REST Service

I am developing a Spring Boot Application which consumes another REST service to get the User’s Account information. The same service provides multiple operations like:

GET: /userid/retrive -to get user and account information

POST: /user/create – to create a new user

POST: /userid/save – to save the user information

DELETE: /userid – to remove the user information from the system

POST: /userid/account : to update account information

So All the above apis are exposed by one service. Some of them return the same response object while others do not and each of them have their own request parameters and request headers that should be set before calling.

So what I have done is I have created a Base class which will have the common code and I have extended it for One Rest template per API operation which will set its own request parameters and call the service and also has different exception loggers/messages.

The service also exposes other operations which we start consuming in our upcoming sprints, and I wanted to make sure if we can utilize any existing design pattern for our advantage.

So I am writing this question to know if there are any alternatives or any design patterns you could suggest so as calling the same service would not have multiple rest templates.

javascript – Consumir api rest mostrando elementos aleatórios

javascript – Consumir api rest mostrando elementos aleatórios – Stack Overflow em Português

Post comment to a modern site page using REST api

Posting to the below endpoint for comments on a site page throws an error.



The expression "web/Lists('cd1dae9b-e3a7-45fc-a610-8069e3dd081d')/GetItemById(305)/Comments" is not valid.

Site page comments are not stored in a list and don’t follow the same schema so how do I post comments via REST endpoints?

How to get content of file in sharepoint using sharepoint rest api

We need to use the below API:


api of sharepoint using list id and item id obtained from /getchanges api. Then use the ServerRelativeUrl field of response to obtain file contents by calling :-


Reference URL:

How to point to/get the file contents or file from SharePoint changes api call

how to get file content from sharepoint list using restapi in java

Similar question discussed here:

java – Getting Comparison method violates its general contract exception while doing Rest call

I am working on a Spring boot application. Recently I have updated the dependency in pom.xml as follows:


Post this, I am getting Comparison method violates its general contract! exception while doing a rest call as follows:

return restTemplate
        .postForEntity(uri, email, String.class).getBody();

Associated API end point is as follows:

  public ResponseEntity<Student> getStudent(@PathVariable String email) {
    Optional<Student> student = studentService.findOne(email);
    return ResponseWrapper.wrap(student);

I don’t understand, how to fix this issue. Could anyone please help here? Thanks.

Get Group Details from Person or Group field using REST API?

Try using this:


Above is working fine for me in case of person or group.



Output: Below is part of response returned from above API call

    <content type="application/xml">
            <d:Title>Ganesh Sanap</d:Title>
    <content type="application/xml">
            <d:Title>SPConnect Members</d:Title>

Where SPConnect Members is a Microsoft 365 group name.

Note: This will not work for SharePoint groups as they don’t have Email property.

sharepoint online – Docusign REST API: Implementing OAuth Authentication using JWT Grant from Microsoft Flow

I am getting below error when making HTTP call for JWT Token,

The Authorization Call successeeded well as whown in below screenshot , but when making HTTP Call for JWT Acess Token (screenshot 2), then below error({“error”:”invalid_grant“,”error_description”:”unsupported_grant_type“}) as shown in screenshot 4 below.

I am new to using/developing Docusign for first time,so anyone kindly correct what iam doing wrong (like if i need to put/correct URL,Headers,Body,….. ) or plese guide me about what can be the error Cause.
Kindly Guide me, Thanks in Advance
Iam following below URL from Docusign OAuth Implementation

Step 1. Request application consent
Step 2. Create a JWT
Step 3. Obtain the access token –>getting Error @ implementing this step
Step 4. Get your user’s base URI
Step 5. Use the access token to make an API call

({variables('IntegratorKey')}&redirect_uri=https://localhost1{variables('Docusign AccountID')}/envelope

Error screenshot

Pass multiple tags slug to rest API

I can pass a single tag slug to WP REST API. But, cannot pass multiple tags slug. It gives an error.

register_rest_route( 'w1/unica/', 'posts/(?P<slug>(a-z0-9)+(?:-(a-z0-9)+)*)', array(
  'methods' => 'GET',
  'callback' => 'unica_get_posts_by_tag',
  'args' => array(
      'slug' => array (
          'required' => true

) );

Having problems uploading PDF file via REST API using C#

I am currently writing a C# program that uses the Sharepoint REST API to manage uploading and downloading of files.

Currently can retrieve files stored in folders in a subsite without problems, but I am having issues with uploading files to the same folders.

I use “/_api/web/getfolderbyserverrelativeurl(‘/Folder1/Folder2/File)$value” to retrieve a file. This works fine.

I can also get the folder itself via “_api/web/getfolderbyserverrelativeurl(‘/Folder1/Folder2′)
I am thinking I can use the same URI structure to add a file to that folder by adding “/files/add(url=’filename’, overwrite=true)” to the end of the above URI.
Set the method to “POST”, Accept to “application/json; odata=verbose”, ConentLength to length of file being sent. Also added Authorization and X-RequestDigest headers to the webrequest.

When the webrequest is sent to the server I get the following errors back (after about 30secs).

  • HttpRequestException: An error occurred while sending the request
  • IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host
  • SocketException: An existing connection was forcibly closed by the remote host

My question is… Has anyone else seen these sort of errors before and am I approaching this is the correct way.

Also related to this, once I get this file uploaded how do I add metadata to it? Or does the meta data get added to the file as it is uploaded?

Any thoughts or comments are very much appreciated.

DreamProxies - Cheapest USA Elite Private Proxies 100 Private Proxies 200 Private Proxies 400 Private Proxies 1000 Private Proxies 2000 Private Proxies - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive New Proxy Lists Every Day Proxies123