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

feat: Set content-type header for HTTP requests #328

Merged
merged 3 commits into from
Feb 22, 2021
Merged

Conversation

jooohhn
Copy link
Contributor

@jooohhn jooohhn commented Feb 22, 2021

Summary

  • Make default application/x-www-form-urlencoded value a constant
  • delet

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?:

@jooohhn jooohhn requested a review from haoliu-amp February 22, 2021 17:48
@@ -929,7 +930,7 @@ - (void)makeEventUploadPostRequest:(NSString *)url events:(NSString *)events num
[postData appendData:[checksum dataUsingEncoding:NSUTF8StringEncoding]];

[request setHTTPMethod:@"POST"];
[request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
[request setValue:self.contentTypeHeader forHTTPHeaderField:@"Content-Type"];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should you set a default value if it's nil?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to add that in init method, should be fixed now

@jooohhn jooohhn merged commit 21f138c into main Feb 22, 2021
@jooohhn jooohhn deleted the feat-content-type branch February 22, 2021 19:42
github-actions bot pushed a commit that referenced this pull request Feb 22, 2021
# [7.3.0](v7.2.2...v7.3.0) (2021-02-22)

### Features

* Set content-type header for HTTP requests ([#328](#328)) ([21f138c](21f138c))
@github-actions
Copy link

🎉 This PR is included in version 7.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants