profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/Pavani-Y/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

issue commentdavidmoten/odata-client

httpResponse of odata.client.HttpResponse put(String s, .List<RequestHeader> list, InputStream inputStream, int i,HttpRequestOptions httpRequestOptions) does not give reponse body in httpResponse.getText() as post() method gives.

Thanks much for the quick response David. Looking forward for it. Can you please provide a tentative timelines for fix to be available, so we can plan our work accordingly.

Pavani-Y

comment created time in 2 days

issue commentdavidmoten/odata-client

httpResponse of odata.client.HttpResponse put(String s, .List<RequestHeader> list, InputStream inputStream, int i,HttpRequestOptions httpRequestOptions) does not give reponse body in httpResponse.getText() as post() method gives.

Hi David, I'm using graphService._service().put() as shownin sample code below. Because _custom().putStringReturnsString() and _custom().putString() were not suitable to my request. I'm trying to upload content of file, through uploadUrl received from create upload session. below code is able to upload the content successfully, and giving status appropritely. but not the response body as expected.

_byte[] rawContent , String uploadUrl; List<RequestHeader> requestHeaderList = Lists.newArrayList(RequestHeader.ODATA_VERSION, RequestHeader.contentType("application/octet-stream"), RequestHeader.contentRange(0,20,33)); InputStream inputStream = new ByteArrayInputStream(rawContent); HttpResponse response = graphService.service().put(uploadUrl, requestHeaderList, inputStream, rawContent.length, RequestOptions.EMPTY);

As per Microsoft documentation, response for initial ranges: status->202 Accepted + response body shows uploadSession details of expirey time and nextExpected ranges response for final range: status->201 Created + response body shows the item created. This works good as i try in Postman.

Regards, Pavani

Pavani-Y

comment created time in 2 days

issue openeddavidmoten/odata-client

httpResponse of odata.client.HttpResponse put(String s, .List<RequestHeader> list, InputStream inputStream, int i,HttpRequestOptions httpRequestOptions) does not give reponse body in httpResponse.getText() as post() method gives.

Hi David, I tried to create upload session using below post method. _com.github.davidmoten.odata.client.HttpService public com.github.davidmoten.odata.client.HttpResponse post(String url, java.util.List<com.github.davidmoten.odata.client.RequestHeader> requestHeaders, String content, com.github.davidmoten.odata.client.HttpRequestOptions options) Maven: com.github.davidmoten:odata-client-runtime:0.1.59

I'm receiving response like below from httpResponse.getText() here: "{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.uploadSession","expirationDateTime":"2021-07-22T17:25:42.05Z","nextExpectedRanges":["0-"],"uploadUrl":"https://xyz-my.sharepoint.com/personal/user_xyz_onmicrosoft_com/_api/v2.0/drives/{driveid}/items/{itemid}/uploadSession?guid='....'&overwrite=True&rename=False&dc=0&tempauth=......"}"

And then, I'm trying to upload content using upload url received from above method. I'm using below put method to execute the uploadurl. But i receive { "responseCode": 202, "bytes": null, "text": null } in httpResponse. com.github.davidmoten.odata.client.HttpService public abstract com.github.davidmoten.odata.client.HttpResponse put(String s, java.util.List<com.github.davidmoten.odata.client.RequestHeader> list, java.io.InputStream inputStream, int i, com.github.davidmoten.odata.client.HttpRequestOptions httpRequestOptions) Maven: com.github.davidmoten:odata-client-runtime:0.1.59

As per documentation, i would need to get response as below: HTTP/1.1 202 Accepted Content-Type: application/json { "expirationDateTime": "2015-01-29T09:21:55.523Z", "nextExpectedRanges": ["26-"] } OR HTTP/1.1 201 Created Content-Type: application/json { "id": "912310013A123", "name": "largefile.vhd", "size": 128, "file": { } }

Can you please check on why httpResponse.getText() is null in the response. Also please suggest if any alternative, as i would need the actual reponse text.

Thanks, Pavani.

created time in 3 days

issue commentdavidmoten/odata-client

upload file to onedrive through createUploadSession - itemWithPath() not found

Hi David, I tried to create upload session using below post method. _com.github.davidmoten.odata.client.HttpService public com.github.davidmoten.odata.client.HttpResponse post(String url, java.util.List<com.github.davidmoten.odata.client.RequestHeader> requestHeaders, String content, com.github.davidmoten.odata.client.HttpRequestOptions options) Maven: com.github.davidmoten:odata-client-runtime:0.1.59

I'm receiving response like below from httpResponse.getText() here: _"{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.uploadSession","expirationDateTime":"2021-07-22T17:25:42.05Z","nextExpectedRanges":["0-"],"uploadUrl":"https://xyz-my.sharepoint.com/personal/user_xyz_onmicrosoft_com/api/v2.0/drives/{driveid}/items/{itemid}/uploadSession?guid='....'&overwrite=True&rename=False&dc=0&tempauth=......"}"

And then, I'm trying to upload content using upload url received from above method. I'm using below put method to execute the uploadurl. But i receive { "responseCode": 202, "bytes": null, "text": null } in httpResponse. com.github.davidmoten.odata.client.HttpService public abstract com.github.davidmoten.odata.client.HttpResponse put(String s, java.util.List<com.github.davidmoten.odata.client.RequestHeader> list, java.io.InputStream inputStream, int i, com.github.davidmoten.odata.client.HttpRequestOptions httpRequestOptions) Maven: com.github.davidmoten:odata-client-runtime:0.1.59

As per documentation, i would need to get response as below: HTTP/1.1 202 Accepted Content-Type: application/json { "expirationDateTime": "2015-01-29T09:21:55.523Z", "nextExpectedRanges": ["26-"] } OR HTTP/1.1 201 Created Content-Type: application/json { "id": "912310013A123", "name": "largefile.vhd", "size": 128, "file": { } }

Can you please check on why httpResponse.getText() is null in the response. Also please suggest if any alternative.

Thanks, Pavani.

Pavani-Y

comment created time in 13 days

issue commentdavidmoten/odata-client

upload file to onedrive through createUploadSession - itemWithPath() not found

Thanks David. Will try for custom request. Looking for uploading files on root and also under any folder in a drive. POST /drives/{driveId}/items/{itemId}:/{fileName}:/createUploadSession POST /drive/root:/{fileName}:/createUploadSession

Pavani-Y

comment created time in 18 days

issue commentdavidmoten/odata-client

upload file to onedrive through createUploadSession - itemWithPath() not found

Tried below code. Throws invalid request error. graphService .users(userId) .drive().root() .createUploadSession(DriveItemUploadableProperties.builder().build().withName("abc.txt"), true) .get()

Error:Bad Request
{ "timestamp": "2021-07-16T07:32:52.588+00:00", "path": "/api/o365/v1/drives/bisht%40hpdatapro.onmicrosoft.com/createUploadSession", "status": "BAD_REQUEST", "error": "Bad Request", "requestId": "efe58cdf-2", "statusCode": 400, "message": "responseCode=400 from url=https://graph.microsoft.com/v1.0/users/bisht%40hpdatapro.onmicrosoft.com/drive/root/createUploadSession, expectedResponseCode in [200, 299], message=\n{"error":{"code":"invalidRequest","message":"Invalid request","innerError":{"date":"2021-07-16T07:32:26","request-id":"97973f78-9c54-4624-a8cd-72b1f18f06a6","client-request-id":"97973f78-9c54-4624-a8cd-72b1f18f06a6"}}}" }

Pavani-Y

comment created time in 19 days

issue openeddavidmoten/odata-client

upload file to onedrive through createUploadSession - itemWithPath() not found

Hi David, Found some posts on githud to do following for creating uploading session to upload an item to a drive. But i dont see the itemWithPath() available on root(). Can you please check on this. or suggest an alternative to get uploadSession.

graphService .users(oneDriveUserId) .drive() .root() .itemWithPath("filename.pdf") .createUploadSession(new DriveItemUploadableProperties()) .buildRequest() .post();

Thanks, Pavani

created time in 20 days

issue openeddavidmoten/odata-client

Onedrive delta link, does not give top(2), but gives all changes though top is added

Hi David, For OneDrive delta link, below query gives all items instead of top 3. If this is not the right way. Please let me know how to get pagewise data for Onedrive deltalink. graphService .drives("") .root() .children() .urlOverride(deltaLink) .top(3) .get()

Thanks, Pavani

created time in a month

issue commentdavidmoten/odata-client

DriveItem does not have the @microsoft.graph.downloadUrl property

I'm able to download content with @microsoft.graph.downloadUrl too.

Pavani-Y

comment created time in a month

issue commentdavidmoten/odata-client

DriveItem does not have the @microsoft.graph.downloadUrl property

Yup! I could fetch the mediaReadLink and download content too, successfully. Thankyou David.

Pavani-Y

comment created time in a month

issue openeddavidmoten/odata-client

DriveItem does not have the @microsoft.graph.downloadUrl property

Hi David, I'm trying to get @microsoft.graph.downloadUrl from drive item retrieved as shown below. But the driveItem does not have the downloadurl property. How can i get the download url. DriveItem item = graphService .drives(driveId) .items(itemId) .select("@microsoft.graph.downloadUrl") .get(); Thanks, Pavani

created time in a month

issue commentdavidmoten/odata-client

How to get partial range of content of a drive item(file)

Hey David. Works good! Thanks much for the quick response.

Pavani-Y

comment created time in 2 months

issue commentdavidmoten/odata-client

How to get partial range of content of a drive item(file)

Thanks David. Will check and update you.

Pavani-Y

comment created time in 2 months

issue commentdavidmoten/odata-client

How to get partial range of content of a drive item(file)

Hi David, I tried as mentioned below. But it gives full content and 200 response. But graph api to get content, gives partial content when range headers are given with 206 Partial content as response. My goal here is to get partial content. Can you please check on this. Optional<StreamProvider> sp = graphService .drives(driveId) .items(itemId) .requestHeader("Range", "bytes=0-100") .metadataFull() .get() .getContent();

Also tried without .metadatafull(). Still gives whole content with 200 response

Thanks, Pavani

Pavani-Y

comment created time in 2 months

issue openeddavidmoten/odata-client

How to get partial range of content a drive item(file)

Hi David, We have implemented code to get item content as per you suggestion earlier in issue https://github.com/davidmoten/odata-client/issues/128. Optional<StreamProvider> sp = graphService .drives(driveId) .items(itemId) .get() .getContent(); Now i'm looking to get partial range of contents. I need to give Range header, to same get content api. Can you please help with how to give range headers to it.

Thanks, Pavani

created time in 2 months