Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making a call that uses application/xhtml+xml fails #298

Closed
2 of 6 tasks
thewahome opened this issue Jul 16, 2020 · 0 comments
Closed
2 of 6 tasks

Making a call that uses application/xhtml+xml fails #298

thewahome opened this issue Jul 16, 2020 · 0 comments
Assignees

Comments

@thewahome
Copy link

Bug Report

Prerequisites

  • Can you reproduce the problem?
  • Are you running the latest version?
  • Are you reporting to the correct repository?
  • Did you perform a cursory search?

For more information, see the CONTRIBUTING guide.

Description

I noticed that all calls by the sdk use the application/json header. I am making a request to https://graph.microsoft.com/v1.0/me/onenote/sections/{section-id}/pages
and it requires application/xhtml+xml as the request header.

The payload is:

<!DOCTYPE html>
<html>
  <head>
    <title>A page with a block of HTML</title>
  </head>
  <body>
    <p>This page contains some <i>formatted</i> <b>text</b>.</p>
  </body>
</html>

Looking at the network call, the content-type is set to application/json and not the one passed into the client.headers() function

Console Errors: [Is there any console error]

Screenshots: [If applicable, add screenshots to help explain your problem]

Steps to Reproduce

  1. Log in to graph explorer
  2. Run the create page query after setting the required section id
  3. notice the bad request and the response as the screenshot above shows

Expected behavior:
A page in my one note would be created

Actual behavior:
I receive a bad request error

Additional Context

Add any other context about the problem here..

Usage Information

SDK Version - [SDK version you are using]

  • Node (Check, if using Node version of SDK)

Node Version - [The version of Node you are using]

  • Browser (Check, if using Browser version of SDK)

Browser Name - [The name of Browser that you are using for SDK]

Version - [The version of the browser you are using]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants