Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Skylark » Skylark : GetIdentity alternative way of working
Re: Skylark : GetIdentity alternative way of working [message #57564 is a reply to message #53802] Sat, 25 September 2021 22:42 Go to previous messageGo to previous message
Klugier is currently offline  Klugier
Messages: 1077
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello Xemuth,

I saw your recent message. I think you should just create PR into Mirek's repository and code could be review there. This should also speed the time when changes will be present on master/main branch of Skylark.

However, I have a questions to the current solution (in context of framework improvement we need to think more globally rather than locally (how to fix my problem only)):
- What if there will be more than one identity (is this reasonable scenario)? Could we call several post_identity in one witz file?
- Backwards compatibility - does it break something?

You could simplify your solution
	//New
	for(const Upp::String& key : http->var.GetKeys()){
		if(key.Find("__identity__") != -1){
			return http->var.Get(key).ToString();
		}
	}
        auto s = AsString(Uuid::Create());


Also extract this ""__identity__" (magic string problem) into constexpr variable (example):
constexpr const char* IDENITY = "__identity__";


Klugier


U++ - one framework to rule them all.

[Updated on: Sat, 25 September 2021 22:44]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: stable
Next Topic: Proposition: Adding a way to send huge file via stream in skylark
Goto Forum:
  


Current Time: Mon Jun 17 09:32:59 CEST 2024

Total time taken to generate the page: 0.02541 seconds