Skip to content

moveFolder() fails HttpClientErrorException #51

@martin-schmude

Description

@martin-schmude

Call of moveFolder() results in HttpClientErrorException.
The exception contains a detailMessage:
400 Bad Request: "{"error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"The parameter name flags is not valid."}}}"

I copied the moveFolder() method and modified it to leave the flags away. So the URL is not
https://<company-site>/_api/web/GetFolderByServerRelativeUrl('/sites/<site>/<from>/')/moveto(newUrl='/sites/<site>/<to>/',flags=1)
but instead
https://<company-site>/_api/web/GetFolderByServerRelativeUrl('/sites/<site>/<from>/')/moveto(newUrl='/sites/<site>/<to>/')
With this modification the exception did not occur anymore, and the folder was moved as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions