Skip to content
This repository was archived by the owner on Feb 5, 2024. It is now read-only.

Persistent File Pointer Preventing Subsequent Requests #61

@keelerm84

Description

@keelerm84

I'm probably overlooking something obvious, so if that's the case, please forgive me.

I am basically following the examples provided in the README to query for a document and if it doesn't exist, I'm trying to create it.

The odd thing is, if I don't query for the document first, I am able to successfully create the document. But if I query first, I get a 404 response from the library.

The reason for this is that in the HTTP/StreamClient (and Socket too I believe), once you make a successful request, $this->httpFilePointer is saved and re-used. The problem is that querying for a document by ID appends that to the path, so subsequent calls (like postDocument) try to post to /database_name/id_i_queried_for instead of just /database_name

Am I overlooking something or misusing the library in some way? Thank you for any insight.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions