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

Add xml support to HTTP monitors #2610

Merged

Conversation

bayramberkay
Copy link

⚠️⚠️⚠️ Since we do not accept all types of pull requests and do not want to waste your time. Please be sure that you have read pull request rules:
https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#can-i-create-a-pull-request-for-uptime-kuma

Tick the checkbox if you understand [x]:

  • I have read and understand the pull request rules.

Description

There is an existing pr request but I guess it hasn't been active for a long time. That's why I just wanted to make a pr request by copy-pasting the xml part. I think it will help most people waiting for this feature.

Fixes #(issue)

#1679
#1332
#1987
#2497

Type of change

Please delete any options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Checklist

  • My code follows the style guidelines of this project
  • I ran ESLint and other linters for modified files
  • I have performed a self-review of my own code and tested it
  • I have commented my code, particularly in hard-to-understand areas
    (including JSDoc for methods)
  • My changes generate no new warnings
  • My code needed automated testing. I have added them (this is optional task)

Screenshots (if any)

209863902-a0b37350-d1c8-4e15-bbbe-fa9e7f2c3990

@bayramberkay
Copy link
Author

@louislam , @JustinTisdale commits are protected as we speak. Can we go live?

@chakflying
Copy link
Collaborator

Should users be able to override the contentType by setting custom headers?

@louislam
Copy link
Owner

Should users be able to override the contentType by setting custom headers?

Custom headers should be the higher priority.

@Genc
Copy link
Contributor

Genc commented Jan 15, 2023

Should users be able to override the contentType by setting custom headers?

Custom headers should be the higher priority.

How should we continue? Is the current state enough?

@Genc
Copy link
Contributor

Genc commented Jan 19, 2023

How can we advance the process this pr? @louislam @chakflying

server/model/monitor.js Outdated Show resolved Hide resolved
@Genc
Copy link
Contributor

Genc commented Jan 21, 2023

How should we continue the process as there are some friends waiting for this? @louislam @chakflying

@louislam louislam added this to the 1.21.0 milestone Jan 31, 2023
@louislam louislam added the question Further information is requested label Feb 18, 2023
@louislam
Copy link
Owner

Found 2 issues:

  1. Body Encoding will be empty for old monitors
    image

  2. The example placeholder is still in JSON format.
    image

@Genc
Copy link
Contributor

Genc commented Feb 18, 2023

Found 2 issues:

  1. Body Encoding will be empty for old monitors
    image
  2. The example placeholder is still in JSON format.
    image

Thank you very much for your attention. I have good news, fixed them! @louislam

@louislam louislam removed the question Further information is requested label Feb 23, 2023
@louislam louislam merged commit cecb0b6 into louislam:master Feb 24, 2023
@danwie
Copy link

danwie commented Mar 22, 2023

@Genc Could you please explain why Body Encoding: "Form" was removed in #2610 commit 3adc9e6 ? How are we supposed to make a ordinary POST (x-www-form-urlencoded) when the only options are Json/XML?

@louislam
Copy link
Owner

@Genc Could you please explain why Body Encoding: "Form" was removed in #2610 commit 3adc9e6 ? How are we supposed to make a ordinary POST (x-www-form-urlencoded) when the only options are Json/XML?

Some History:

Originally xml/form data implementation was started by #1987, but it was abandoned and unfinished for a long time. Then @bayramberkay and @Genc wanted to implement xml and used #1987's code.

The form data implementation is never existed in any previous versions of Uptime Kuma. The commit 3adc9e6 was just removing those unfinished code only.

@anderskvist
Copy link
Contributor

I have created this PR that should be ready to merge that will add x-www-form-urlencoded requests - #3499

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

Successfully merging this pull request may close these issues.

6 participants