Git Product home page Git Product logo

getit's Introduction

GetIt

Open Source HTTP client to test your API's.

License: MIT
Build & Test GetIt Codacy Badge Vulnerability scan

Build MacOS package Build Windows executable Build Linux Flatpak


Welcome to the Git repository of GetIt. GetIt is a small open source application to send API request using a cross-platform GUI. The main advantage of GetIt is the fact that it's native, no matter what platform you use, and it's completely open source.

Table of contents

1. Overview

GetIt's main focus is providing an easy user interface to send HTTP request to your API endpoints. GetIt is developed for developers who'd like a native application which is capable of saving requests in a modern file format.

Main screen of GetIt

1.1 Sharing requests

GetIt uses the JSON-format to store request information, however, when you've got a request that uses files these files aren't incorporated into the GetIt request file.

The main features of GetIt compared to the alternatives are the way requests can be shared. There are other applications which let's you synchronise a number of requests using a proprietary cloud solution with a subscription. In the design of GetIt we took the sharing of requests very seriously but since we're not an entire company we can't setup an entire cloud solution. Thus we've made sure the file contents are human readable an easy to check-in using VCS.

1.2 Roadmap

Because GetIt is maintained in the spare time, not all features that we'd like are implemented as of yet. Some of the features we'd like to see in GetIt are listed below. These features are also added as issues on GitHub so the status can be viewed in the projects tab.

  • Multiple authentication flows
    • OAuth
    • JWT
    • Basic Auth
  • Environment variables
    • Variables that are stored in the request itself
    • Variables that are stored in the settings of GetIt
      • To allow API secrets to be stored, but not checked into VCS
  • Automated stress testing

2. External dependencies

GetIt uses CMake to download and compile most of it's dependencies. However, not all dependencies are aviable through this method so these need to be installed on the machine itself before compiling. When downloading and executing a pre-built release from the Releases tab on Github, these dependencies aren't required.

  • Qt
    • The GUI framework used by GetIt
  • Boost
    • Helper libraries for formatting strings and used by CppRestSdk, which in turn is used by GetIt as the HTTP library
  • Ninja
    • Cross-platform build system
  • CMake
    • Cross-platform build tool generator

3. Build

3.1 MacOS

# Disable warnings as error, these warning are from the CppRestSdk dependency
$ cmake . -G Ninja -D CMAKE_CXX_FLAGS="-w"
$ ninja GetIt

This will create the ./bin/GetIt.app file. This can be executed by double-clicking it in Finder.

Please note that this app bundle does NOT include the dependencies or the Qt framework. When you move the bundle to a different location on your computer (or another computer altogether) the application might not start.

3.2 Linux

NOT TESTED YET!

The following steps have not been tested yet, if you follow these steps, and it works, please open a PR to remove this warning. If these steps don't work, and you've got a working solution. Please also open a PR to include your steps here.

$ cmake . -G Ninja
$ ninja GetIt

This will create the ./bin/GetIt binary file. It can be executed by either running ./bin/GetIt from the terminal or double-clicking the file through your file browser.

3.3 Windows

NOT TESTED YET!

The following steps have not been tested yet, if you follow these steps, and it works, please open a PR to remove this warning. If these steps don't work, and you've got a working solution. Please also open a PR to include your steps here.

$ cmake . -G Ninja
$ ninja GetIt

This will create the ./bin/GetIt.exe executable. It can be executed by double-clicking the file from Explorer.

4. Package

4.1 MacOS

Build the MacOS app bundle with all dependencies and framework included by running the package.sh script in the MacOS packaging folder.

$ zsh ./packaging/macos/package.sh

This will create the ./bin/GetIt.app app bundle with all required dependencies. This file can be distributed across multiple systems.

4.2 Linux

This is not completed yet, there is going to be a script to generate a flatpak bundle.

4.3 Windows

This is not completed yet, there is going to be a script to generate a Windows executable file.

5. Automated testing

To validate that GetIt works, and keeps working through various updates GetIt includes automated unit tests using Catch2. These tests are automatically executed when you create a PR or when directly pushing to the main branch (which should NEVER be done!).

To execute these tests manually you need to specify the getit_tests build target.

$ cmake . -G Ninja
$ ninja getit_tests

# Execute the test cases
$ ./bin/getit_tests

This will generate an application that will test GetIt when executed.

6. Contribute

If there's a feature you'd like to see, or a bug you've encountered? Please let us know! Or, even better, fix it yourself! If you'd just like to contribute back to GetIt but you're not quite sure how to help, take a look at the roadmap for features we'd love to see in GetIt.

All contributions are welcome, so feel free to join the open source community and support GetIt through your expertise!

To make sure everyone can contribute to GetIt we value the quality and understandability of our code. When you're building a feature, or patching a bug and you've made a decision. Please document this decision in the docs/design.md document. This will help future contributors understand your rationale. If you've updated some logic in the code, please always update related test cases or add test cases to test your logic.

6.1 Branching strategy

You've got your idea to help us out, but you're not quite sure how to setup your branch. We'll we've got you covered!

This project does not use a development branch but uses short lived feature branches which are directly merged into main. We've chosen this strategy 'cause we believe in release often, release fast, there's no need for your feature to gather dust in a stale development branch. However we do have some guidelines:

  • If you're contributing a feature use the feature/<your-feature> naming convention
  • If you're contributing a bug fix use the bugfix/<bug-name> naming convention
  • If you're contributing to documentation use the documentation/<type-of-documentation> naming convention
  • If you're contributing a small fix, like a version bump to a dependency, use the hotfix/<hotfix-type>-<name> naming convention

getit's People

Contributors

bartkessels avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

getit's Issues

JSON response highlighting

As of right now the syntax highlighting of a response is based on the Content-Type headers but if an API uses a JSON response without setting the correct Content-Type header the JSON gets formatted correctly but it's not highlighted.

If the JSON syntax highlighting could always be set when the response is JSON formatted instead of relying on the Content-Type header, for other request types the Content-Response header should still be used

Clear headerbar

When clearing a request the subtitle in the headerbar is not removed, same goes for opening a request.

Variables

Allow the use of variables.

Create global variables through another window and allow the values to be overridden on a per request basis. If the request is saved only save the variables that are declared directly on the request. This way secret variables can be set on a global basis and they won't be shared through a request file.

Formdata element is not being recognized

When adding multiple formdata elements to the request and then removing one in the middle the one directly below the removed element isn't added to the request. The element isn't even recognized as a formdata_element object in the code.

Example

First request

val1
val2
val3
val4

Expected output
[val1, val2, val3, val4]

Actual output
[val1, val2, val3, val4]

Second request

Removing val2

val1
val3
val4

Expected output
[val1, val3, val4]

Actual output
[val1, val4]

Update screenshots readme

Update the screenshots in the readme to reflect the newly added HTML preview and pretty JSON output

Save and load headers

When saving (and loading) a request, the headers are not stored in the .request file.

Automated response check

Add a new fragment in which the user can enter the required response and headers and let GetIt validate the actual response against the required response.

Do this in a way that if the request contains more headers the check won't fail

Run request on background thread

Right now the request is ran on the main thread causing the application to have to wait for a response from the server. This should be done on a background thread notifying the main thread when a response is returned. This way the application is still responsive while waiting for the server

Optionally disable X509 validation

Some of us run our private APIs over https with an invalid certificate (self signed or private CA). This application should allow a user to optionally disable certificate validation, so that the end user does not need to fiddle with system wide trust stores.

Basically, what I am saying is that we should have a checkbox somewhere that makes the equivalent of calling curl -k on a per request basis. Would you consider adding something like that?

Update scrollviews

Update the scrollviews so not all the content in a stack is scrollable.

I.E. when sending a request with extremely long headers the HTML preview
won't look as it should 'cause the entire form is scrollable from left to right

Add recent requests

Add a sidebar with recent requests.

Save the recent requests in ~/.getit/recent and allow the recent requests to be cleared

Unable to build project

Unable to build project because bin/Automake.in is missing.
And instructions in README are wrong, it says to run ./src/getit but the src folder does not exist

Use consequent syntax for CMake flags

Describe the bug

Right now the CMake flags for GetIt are:

  • packaging
  • use_installed_dependencies
  • UseQt6

These should all use the same format, either all snake case or all camel case.

To Reproduce

Not applicable

Expected behavior

Guidelines for a naming convention for CMake flags and adhere to these guidelines.

Appstream file not being installed correctly

When GetIt is installed the appstream file stil contains the underscores (_) in the translated tags.
I.E.:

<_p>Features of GetIt include:</_p>

When it should be:

<p>Features of GetIt include:</p>

Don't use application menu

Please don't use GTK's application menu. It's deprecated in GNOME design guideline. Instead, move all its contents to the "hamburger" menu.

Please bump version

Hi,
can you please accept my pull request and release a new bugfix version.
flatpak is giving me warnings that the platform 3.32 is not supported any more and needs to be updated.
I went ahead and updated the flatpak manifest to use 3.36 (which worked locally) and created a pull request..

Ref:
#25
flathub/net.bartkessels.getit#3

Add option to 'beautify' JSON output

Add option that will lay out the JSON in a more readable way.
So when you get JSON output like this

[{'pk': 1,'name':'obj1'},{'pk':2','name':'obj2'}]

Another view should show it like this:

[
    {
        'pk': 1, 
        'name': 'obj1'
    },
    {
        'pk': 2',
        'name': 'obj2'
    }
]

Missing Authentication

Did this feature get removed? Looking at the feature playlist, I can see that GetIt used to support authentication a few years ago: https://youtu.be/ueBDXKY3WI4
I'm running 4.0.9 Flatpak version, and I can't find any way to add authentication.

Rewrite response body widget to use the MVP pattern

Use the same pattern for the response body widget as the response body widget. It has to be expandable by simply plugin in extra response body widgets (I.E. for syntax highlighting in a different widget) and it has to adhere to the same pattern as the other widgets.

openSUSE package

I'm a package maintainer for openSUSE and wanted to package GetIt.

It seems that so far you depend on having git installed so that you can pull down some third party stuff.
In many distribution build systems this won't possible as distributions want to pull everything in advance and put it into a tar file, having reproducible and pristine tarballs.

It would be great if you could have this dependency tracked as a regular dependency in CMake (like boost etc) or could include it in your repository or your release tarball.

Build output:

[   29s] -- The C compiler identification is GNU 12.2.1
[   29s] -- The CXX compiler identification is GNU 12.2.1
[   29s] -- Detecting C compiler ABI info
[   29s] -- Detecting C compiler ABI info - done
[   30s] -- Check for working C compiler: /usr/bin/cc - skipped
[   30s] -- Detecting C compile features
[   30s] -- Detecting C compile features - done
[   30s] -- Detecting CXX compiler ABI info
[   30s] -- Detecting CXX compiler ABI info - done
[   30s] -- Check for working CXX compiler: /usr/bin/c++ - skipped
[   30s] -- Detecting CXX compile features
[   30s] -- Detecting CXX compile features - done
[   30s] -- Found Boost: /usr/lib64/cmake/Boost-1.80.0/BoostConfig.cmake (found version "1.80.0") found components: system 
[   30s] -- Found OpenSSL: /usr/lib64/libcrypto.so (found version "1.1.1q")  
[   30s] CMake Error at /usr/share/cmake/Modules/ExternalProject.cmake:2789 (message):
[   30s]   error: could not find git for clone of extern_restsdk-populate
[   30s] Call Stack (most recent call first):
[   30s]   /usr/share/cmake/Modules/ExternalProject.cmake:4170 (_ep_add_download_command)
[   30s]   CMakeLists.txt:23 (ExternalProject_Add)
[   30s] 

GError object not being freed

In getit-content-body.c getit_content_body_add_formdata_to_request (...) the GError object is not being freed when an error occurs. It skips the iteration but should also free the memory before skipping the iteration

Syntax highlighting response not working

When sending a request the syntax highlighting is not working.

When sending a GET request to https://bartkessels.net the HTML is displayed as plain text. The Content-Type header has text/html as value.

When sending a GET request to https://google.com the HTML is displayed with syntax highlighting. The Content-Type header has text/html; charset=UTF-8 as value.

Load testing

Add option to load test an endpoint

In the UI add an extra fragment to set the load test parameter

  • Number of 'users'
  • Number of requests per user
  • Total time in which the requests should be sent

In the response fragment add a dropdown for each request so all the responses can be viewed separately.

Passing newline, "\n", in Key Value Pair

I'm trying to pass a newline character as a Form Data text value and I'm unable to stop GetIt from escaping the \n. My program shows the parameter sent from GetIt as displaying \\n.

I've tried the following:

  • \\n which gets expanded to \\\\n
  • \"\n\" which gets expanded to \\&quot;\\n\\&quot;
  • %0D%0A which stays the same.

How can I pass a newline character as a form data text key value pair?

Thank you.

Rewrite to QT

Rewrite application to the QT framework for cross-platform support

GTK version will be kept in separate branch

Flathub package not installing

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Run flatpak install --user getit.flatpak

Expected behavior
It should install

Desktop (please complete the following information):

  • OS: PopOS 22.04
  • Platform: x64

Additional context
The application requires a development version of runtime/org.gnome.Platform, while it should require one of the followings:

1) runtime/org.gnome.Platform/x86_64/3.24
   2) runtime/org.gnome.Platform/x86_64/3.26
   3) runtime/org.gnome.Platform/x86_64/3.28
   4) runtime/org.gnome.Platform/x86_64/3.30
   5) runtime/org.gnome.Platform/x86_64/3.32
   6) runtime/org.gnome.Platform/x86_64/3.34
   7) runtime/org.gnome.Platform/x86_64/3.36
   8) runtime/org.gnome.Platform/x86_64/3.38
   9) runtime/org.gnome.Platform/x86_64/40
  10) runtime/org.gnome.Platform/x86_64/41
  11) runtime/org.gnome.Platform/x86_64/42
  12) runtime/org.gnome.Platform/x86_64/43

Unable to save requests when running in Flatpak

I've been using Getit for a while now and I really enjoy using a GTK-native application for calling APIs but I had a consistent issue with saving requests.

Steps to reproduce:

  1. Open the Flatpak runtime of GetIt
  2. Execute a query in GetIt (For example: GET on 'https://jsonplaceholder.typicode.com/todos/1'
  3. Save the current request in ~/Documents (Hamburger menu -> Save As) (In this case, let's name it test.req)

What's expected:

  • I should find the file test.req at '~/Documents'
    What's happening:
  • the test.req file is not present.

I also notice a text in the bottom of the application that indicate that the file could be somewhere else (File:/run/user1xxx/doc/xxxxxx/test.req). But when I go there, there's no files.

Thanks for looking at this issue!

Create release with oars

4.0.9 fails to build on flathub because the appstream validation has been made stricter and now requires oars.

This was added to GetIt back in april #25.

However, no new releases have been made since then, so flathub can't build the last stable release.

As this is quite a small change with very little chance of causing harm, would you be open to making a new point release that included it?

Alternatively, if you think that would be better for you, the flatpak manifest could be changed to point to latest git master instead.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.