Coder
Coder

Reputation: 21

Microsoft Graph API , http request with header

I was using this code earlier with GraphAPI version 5.75.0

 CustomRequest<String> request =                                                       
   new CustomRequest<>(String.format(sendMailUri, toEmail), getGraphServiceClient(),   
       List.of(new HeaderOption("Content-Type", "text/plain")), String.class);         

request.post(encodedContent);

the sendMailUri is ${app.graphAPI.sendMailUri:https://graph.microsoft.com/v1.0/users/%s/sendMail}

I need to migrate this to latest version 6.4.0 how to do that , I know HeaderOption is depreciated I tried doing a lot of stuff but it was not working, Please help me out,

Thanks in advance!!

Was tying to use this

https://github.com/microsoftgraph/msgraph-sdk-java/blob/dev/docs/upgrade-to-v6.md#use-of-requestinformation-in-place-of-baserequestt

Could not find a conclusive solution

Upvotes: 0

Views: 343

Answers (0)

Related Questions