-
Notifications
You must be signed in to change notification settings - Fork 79
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
Is it possible to use this with a POST request? #20
Comments
This uses the built-in https://github.com/bakercp/ofxHTTP/blob/develop/example_basic_client_post/src/ofApp.cpp or |
hey @bakercp , any chance to get this POST JSON sample ? (404) |
just solved, (I think) it worked doing this:
Now I am looking to handle a user/pass login system for the API REST, maybe something like oAuth |
That is how I would do it!
Also, basic http auth is supported in ofxHTTP as well as oauth 1/2.
…On Fri, Oct 20, 2017, 10:36 AM moebiussurfing ***@***.***> wrote:
just solved, (I think) it worked doing this:
std::string url = "https://test1.io/writejson/";
ofx::HTTP::DefaultClient client;
ofx::HTTP::Context context;
ofx::HTTP::BaseResponse response;
ofx::HTTP::PostRequest postRequest(url, Poco::Net::HTTPMessage::HTTP_1_0);
//Passing a JSON file
putRequest.setPutFile("file.json");
putRequest.setContentType("text/javascript");
...
// post
std::istream& responseStream = client.execute(postRequest,
response,
context);
Now I am looking to handle a user/pass login system for the API REST,
maybe something like oAuth
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AASVxBQN8VI-VOqeKRvG4wgeSmnDSFAGks5suL3ygaJpZM4Jem1S>
.
|
cool! thanks. should I use the master branch to use the oauth? now I am using 0.9.8 with the stable branch. |
I was looking at openRemote and it looks like it can only handle GET requests.
https://github.com/jefftimesten/ofxJSON/blob/master/src/ofxJSONElement.cpp#L70
I was wondering if its possible to use this for POSTs as well?
-cheers,
micah
The text was updated successfully, but these errors were encountered: