What is the Query String in GET Methods?

What is the Query String in GET Methods?

Okay so my other blog is used for more polished blog posts... this blog is used for learning into as well as sharing and documenting my journey and redefining my goals and my focus.

So one of my wonderful seniors and favourite and beloved mentors has set me a task

He has asked me to reserach GET METHOD QUERY STRINGS... or something.

So I am doing the best I can

I am also working on another task from another wonderful senior 

Thank you so much to both!!! 💛

My other senior has asked me to build out a mini small app that will implement a solution for a bug we are having.

He has told me to set up the bug, REPLICATE IT (!!!), and then attempt a fix. This is the best advice ever and I am so grateful for it.

But unfortunately I got interrupted

I hate having to context switch... but I had a meeting (it was very fun) and after that it was hard to get into the project again.

So now I'm lost... do I build out the Django project or do I research the get methods? Well building is harder and it requires more focus... so it should therefore be done earlier in the day.

Researching is easier and it requires less effort... so should I therefore save it until the end of the day?

So should I go back to my building now then, please? 🤔

Okay back later thanks.
___________________________________________________________________________________

Seven Hours Later

Okay but I am so so proud of myself. Like SO so proud of myself. Like really.

I have spent nearly all of the day working on my aforementioned mini django project and I have made SO MUCH PROGRESS. 

We also paired on it with my senior and I have learned so much Django.

Thank you!!! Thank you so much. So while I was afraid - it has all worked out and it was worth it - and I made so much progress and this was amazing I HAVE BEEN CODING PROPERLY AGAIN OMG.

Back to the Homeworkz

Part I of II

Part 2 might need to be done tomorrow...

Homework 1: Query String in GET Methods

Starting with a video... "What is URL Query String and Parameters?"...

What is a  Query String? 

In simple language...

"Anything that you see int the URL after a question mark". Anything that appears in a url after a question mark is a "query string".

A query string can have PARAMETERS.

...

...

...

A parameter can have a key and a value???! To add more parameters... we can use the "&" sign.

This is sooo haardd...


"On the internet, a Query string is the part of a link (otherwise known as a hyperlink or a uniform resource locator, URL for short (!!!)) which assigns values to specified attributes (known as keys or parameters).

the base url is something different than a QUERY STRING

example: 

http://example.com/over/there?name=ferret

(why ferret tho).

"Each query string is made up from a parameter and a value that are joined together using an equals sign".

So like a key value pair in a string or dictionary? I guess.

"MULTIPLE QUERY STRINGS ARE JOINED TOGETHER USING AN AMPERSAND (&)."

PLS SHOW ME EXAMPLES.

http://example.com/over/there?name=ferret&color=white&age=2

Thank you Chat GPT...


Interesting voice from Stack Overflow...

"The query string not only allows for data to be passed on to dynamic pages, but also it does it in such a way that the user can share the link, so that a different person would get the same page."

I find that really interesting.

We all like to share web pages after all. And this one would allow us to share a page with specific user queries.

This can only be done with a GET method. Which is just like my mentor said. OMG!!!

Other thoughts and from other sources...


"It's like a little search string" omg...

Cute image!

Image of a search in amazon.ca for javascript and how this is then subsequently represented in the url.
This image explains it better than anything else I could find.

This lesson has been really cool and I have learned loads from it. I have learned loads from this assignment. I would love to learn more but I have learned a lot already and have been busy today.

More Query Strings:

Edit: logged in because I found more.

"Query strings are generated through a search within a webpage, form submission, or typing a query into the browser's address bar." 

I can see that a lot of the time they come up in digital marketing videos or websites. Link. "A QUERY STRING IS A SET OF CHARACTERS TACKED ONTO THE END OF A URL. THE QUERY STRING BEGINS AFTER THE QUESTION MARK (?) AND CAN INCLUDE ONE OR MORE PARAMETERS".

Then there's some more: ...

"Each parameter is represented by a unique key-value pair or a set of two linked data items."

"An equals sign (=) separates each key and value."

"An "ampersand" (&) separates multiple parameters."

Why are query strings important?

  • Pass information onto the web server, telling it "what content to deliver or action to take".
  • They also "pass information to other applications, improving the user experience."
  • They are important from a marketing perspective - apparently the track website traffic, monitor search terms, and persoanlise marketing campaigns, and so on."
Sorry for the block capitals. This is someone with AuDHD studying after a whole day of full-on coding.

This is HARD.

Basically put (and from wikipedia)...

... a query string is a part of the URL. It "assigns values to specified parameters".

Okay. I'm done now. 

Bye.

But this makes a lot of sense though...

WOW.





Comments

Popular posts from this blog

Hello World

Yosemite

Two Lines of Thought, Makes Me Wonder What I'm Missing