user-guide:additional_interfaces:http
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
user-guide:additional_interfaces:http [2025/01/17 12:57] – [HttpResponse] Tim | user-guide:additional_interfaces:http [2025/01/22 15:47] (current) – [HTTP server user guide] Tim | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== HTTP server | + | ====== HTTP server ====== |
It is possible to start GroIMP as a HTTP server to then send model paths via HTTP for GroIMP to execute. After GroIMP executed the model values can be returned to the HTTP client who send the request. It is possible to send several models in series or in parallel. | It is possible to start GroIMP as a HTTP server to then send model paths via HTTP for GroIMP to execute. After GroIMP executed the model values can be returned to the HTTP client who send the request. It is possible to send several models in series or in parallel. | ||
+ | |||
+ | |||
+ | < | ||
+ | hide footbox | ||
+ | title HTTP server | ||
+ | |||
+ | User -> GroIMP: Start GroIMP | ||
+ | User -> GroIMP: Send Model-path | ||
+ | GroIMP -> User: Return result | ||
+ | User -> GroIMP: Close GroIMP | ||
+ | |||
+ | @enduml</ | ||
===== Execution ===== | ===== Execution ===== | ||
Line 84: | Line 96: | ||
=== getRequest === | === getRequest === | ||
- | This function gives the project access to the request of the user (the specification of the class can be found [[https:// | + | This function gives the project access to the request of the user (the specification of the class can be found [[https:// |
Using this request object, it is possible to access the original query with getQuery() which | Using this request object, it is possible to access the original query with getQuery() which | ||
Line 91: | Line 103: | ||
| | ||
+ | ==== Multi-use Model ==== | ||
+ | Using the HttpResponse.get function will return null if the model was not opened with a http server. Therefore this can be used to ensure that the predefined simulation is not starting automatically if the model was opened with the GUI for modelling. | ||
===== Options ===== | ===== Options ===== | ||
Line 105: | Line 119: | ||
In the subsection Open HTTP server the default port which is suggested by the gui dialog can be defined. This might be useful for a setup where the original default port is often occupied. | In the subsection Open HTTP server the default port which is suggested by the gui dialog can be defined. This might be useful for a setup where the original default port is often occupied. | ||
| | ||
- | ===== Server-Port ===== | + | ===== Tutorials ===== |
+ | |||
+ | * [[: | ||
+ | |||
+ | |||
+ | |||
+ | ===== *Server-Port ===== | ||
A port on a computer is used to define which application is actually meant by a network request. | A port on a computer is used to define which application is actually meant by a network request. |
user-guide/additional_interfaces/http.1737115041.txt.gz · Last modified: 2025/01/17 12:57 by Tim