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

Implement more complex HTTP POST... requests with custom body #638

Closed
SciLor opened this issue Sep 5, 2018 · 25 comments
Closed

Implement more complex HTTP POST... requests with custom body #638

SciLor opened this issue Sep 5, 2018 · 25 comments

Comments

@SciLor
Copy link

SciLor commented Sep 5, 2018

I have a JSON Webservice where I am expecting a specific result when I send a specific answer.

Positive case:
HTTP 400
{ "code": 123 }

Negative case:
HTTP 400
{ "code": 75 }

A workaround could be to allow a shellscript to make the check.

@TimZ99
Copy link
Member

TimZ99 commented Sep 5, 2018

#628 lets you mark HTTP 400 as online.
For the JSON part; why not use the pattern check?

@SciLor
Copy link
Author

SciLor commented Sep 5, 2018

I have to send a specific POST request to check if the service is online.
#628 would be also needed.

As I said as workaround I created a shellscript that is called by a php script that is checked by psm.

@TimZ99
Copy link
Member

TimZ99 commented Sep 5, 2018

#631 is also needed for this. Only an input field is needed and it's done.

@SciLor
Copy link
Author

SciLor commented Sep 5, 2018

Thank you for your quick answers. You may mark this one as duplicate of the others.

@TimZ99
Copy link
Member

TimZ99 commented Sep 5, 2018

It isn't a duplicate. The other issues don't include a post field.

Could you review #628 and #631? They need to be merged first.

@SciLor
Copy link
Author

SciLor commented Sep 5, 2018

What do you expect by review? Never did that before. They both look legit for me.

@TimZ99
Copy link
Member

TimZ99 commented Sep 5, 2018

Testing if the pr works as intended.

@TimZ99
Copy link
Member

TimZ99 commented Sep 5, 2018

If you use git, it's as easy as git checkout 'the branch' and opening your web browser.

@SciLor
Copy link
Author

SciLor commented Sep 5, 2018

Then just copy over the files to an (backuped) installation and check if its fine? I will try that on the weekend latest.

@TimZ99
Copy link
Member

TimZ99 commented Sep 5, 2018

You know what, I just merge them ✨. That way I can work on this issue now 😄.

@TimZ99
Copy link
Member

TimZ99 commented Sep 8, 2018

It's done btw :P

@SciLor
Copy link
Author

SciLor commented Sep 8, 2018

Can I just checkout the git and install it to my server?

@TimZ99
Copy link
Member

TimZ99 commented Sep 8, 2018

How do you have PSM installed? Did you clone using git or download the zip file?

@SciLor
Copy link
Author

SciLor commented Sep 8, 2018

I installed it via the zip file.

@TimZ99
Copy link
Member

TimZ99 commented Sep 8, 2018

Please be aware that this version is not yet released and should be considered a beta.

@SciLor
Copy link
Author

SciLor commented Sep 8, 2018

I used the release zip for the installation of the last release. After following your instructions I now get "php composer.phar install" And on my testserver I am unable to login to a shell

@TimZ99
Copy link
Member

TimZ99 commented Sep 8, 2018

I will create a version with composer. wait a moment.

@TimZ99
Copy link
Member

TimZ99 commented Sep 8, 2018

No description provided.

@SciLor
Copy link
Author

SciLor commented Sep 8, 2018

If I am creating a new server, no server entry is created in the "psm_servers" sql table. "Server added" popup comes up, but no new entry is visible.

@TimZ99
Copy link
Member

TimZ99 commented Sep 8, 2018

hmm, that's weird. Could you enable the debug mode?
add define('PSM_DEBUG', 'true'); to config.php

@SciLor
Copy link
Author

SciLor commented Sep 8, 2018

Warning: SQL error: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'post_field' cannot be null in

Seems to be an easy problem.

PS: I cannot copy paste on the gui of psm.

@TimZ99
Copy link
Member

TimZ99 commented Sep 8, 2018

I noticed that too but forgot to look into it. Could you make an issue for it?

@SciLor
Copy link
Author

SciLor commented Sep 8, 2018

done

@TimZ99
Copy link
Member

TimZ99 commented Sep 8, 2018

I meant for the copying part, but this one is also okay 👍

@SciLor
Copy link
Author

SciLor commented Sep 9, 2018

It seems to work, except that #628 won't work.

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

No branches or pull requests

2 participants